Search Webservice

Search similar object embeddings by text

Search for similar objects by text

post/api/search/searchSimilarObjectEmbeddingsByText

Request

  • Base URL: https://api2.rhombussystems.com
  • URL: https://api2.rhombussystems.com/api/search/searchSimilarObjectEmbeddingsByText
  • Auth: API key in header x-auth-apikey

Headers

x-auth-scheme'api-token' | 'api' | 'partner-api-token' | 'partner-api' required

Authentication scheme identifier. Use api-token for standard API key authentication, partner-api-token for partner API key authentication. Must be paired with the x-auth-apikey header containing your API key.

Request body

includeVectorboolean nullable

Whether to include the embedding vector in the response.

maxNumResultsinteger nullable

Optional number of results to return. Setting to larger numbers will increase latency.

model'CLIP_512' | 'CHARON' required

Model used for embeddings. The streaming variant of this search accepts only "CHARON".

objectTypeFilterstring[] nullable

Optional object type filter. Provide explicit type values to narrow results, or omit to search all object types. Pass the single value "AUTO" to have the server infer the object type (humans or vehicles) from the search text.

onlyMatchesboolean nullable

Only applies to models that classify results as matches: when true (default) return only actual matches; when false return all results within the similarity threshold.

queryDeviceUuidsstring[] nullable

Optional list of device uuids to filter result set on.

queryEndTimeMsinteger nullable required

End time in epoch milliseconds. Results returned will have occurred before this time.

queryStartTimeMsinteger nullable required

Start time in epoch milliseconds. Results returned will have occurred after this time.

searchTextstring nullable required

The search text to find similar objects to. Phrases like "red sedan", "person in yellow shirt", etc.

similarityThresholdnumber float nullable

Optional threshold applied to filter returned results, set as a float in [0.0, 1.0].

Example request

{
  "queryDeviceUuids": [
    "AAAAAAAAAAAAAAAAAAAAAA.v0"
  ]
}

Response

OK

errorboolean nullable
errorCodestring nullable

Stable, machine-readable code for the failure (one of the ApiErrorCode catalog) when error is true. Branch on this, not on errorMsg.

errorMsgstring nullable
moderationReasonstring nullable

Reason for moderation if query is not allowed

queryAllowedboolean nullable

Whether the query is allowed

warningMsgstring nullable

Example response

{
  "similarEmbeddings": [
    {
      "embedding": {
        "deviceUuid": "AAAAAAAAAAAAAAAAAAAAAA.v0",
        "locationUuid": "AAAAAAAAAAAAAAAAAAAAAA",
        "orgUuid": "AAAAAAAAAAAAAAAAAAAAAA"
      },
      "matchedEmbeddingId": "AAAAAAAAAAAAAAAAAAAAAA"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.