POST
/
embeddings
/
search
cURL
curl --request POST \
  --url https://api.usecortex.ai/embeddings/search \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: <content-type>' \
  --header 'accept: <accept>' \
  --data '{
  "embeddings": [
    0.1,
    0.2,
    0.3,
    0.4,
    0.5
  ],
  "tenant_id": "tenant_456",
  "sub_tenant_id": "subtenant_123",
  "max_chunks": 10
}'
{
  "chunk_ids": [
    "CortexEmbeddings123_0",
    "CortexEmbeddings456_0",
    "CortexEmbeddings456_1",
    "CortexEmbeddings123_2",
    "CortexEmbeddings123_8"
  ],
  "scores": [
    0.95,
    0.89,
    0.87,
    0.82,
    0.78
  ]
}
  • max_chunks: 1-200 (default: 10)
  • Format: Single embedding vector (1D array of numeric values)

Sample Request

curl --location 'https://api.usecortex.ai/embeddings/search' \
  --header 'Authorization: Bearer {API_KEY}' \
  --header 'accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
    "embeddings": [0.1, 0.2, 0.3, 0.4, 0.5],
    "tenant_id": "{TENANT_ID}",
    "sub_tenant_id": "{SUB_TENANT_ID}",
    "max_chunks": 5
  }'

Sample Response

{
  "chunk_ids": [
    "CortexEmbeddings123_0",    
    "CortexEmbeddings456_0",
    "CortexEmbeddings456_1",
    "CortexEmbeddings123_2",   
    "CortexEmbeddings123_8"
  ],
  "scores": [
    0.95,
    0.89,
    0.87,
    0.82,
    0.78
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Authorization
string
required

Bearer token (your API key)

Content-Type
string
default:application/json
required

Request content type

accept
string
default:application/json
required

Response content type

Body

application/json

Response

200
application/json

Similar embedding chunks found

The response is of type object.