Skip to main content
POST
/
embeddings
/
filter-raw-embeddings
Error
A valid request URL is required to generate request examples
[
  {
    "source_id": "CortexDoc1234",
    "embedding": {
      "chunk_id": "<chunk_id>",
      "embedding": []
    },
    "score": 1,
    "distance": 1,
    "metadata": {}
  }
]
Hit the Try it button to try this API now in our playground. It’s the best way to check the full request and response in one place, customize your parameters, and generate ready-to-use code snippets.

Examples

curl -X 'POST' \
'https://api.usecortex.ai/embeddings/filter-raw-embeddings' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"tenant_id": "string",
"sub_tenant_id": "string",
"source_id": "string",
"chunk_ids": [
"string"
],
"output_fields": [
"string"
],
"limit": 100
}'
Retrieve embedding vectors for specific chunk IDs that you previously obtained from uploading embeddings or searching.

Requirements

  • chunk_ids: Array of valid chunk ID strings (cannot be empty)
  • tenant_id: Required for multi-tenancy support
  • sub_tenant_id: Optional, defaults to tenant_id if not provided

Response Details

  • embeddings: Dictionary mapping chunk IDs to their embedding vectors
  • not_found_chunk_ids: Array of chunk IDs that were not found in the system

Sample Response

{
  "embeddings": {
    "CortexEmbeddings123_0": [
      21.0,
      22.0,
      23.0,
      24.0,
      25.0,
      26.0
    ],
    "CortexEmbeddings123_1": [
      20.100000381469727,
      20.200000762939453,
      20.299999237060547,
      20.399999618530273,
      20.5,
      20.600000381469727
    ],
    "CortexEmbeddings456_0": [
      1.5,
      2.5,
      8.5,
      8.5,
      8.5,
      6.5
    ]
  },
  "not_found_chunk_ids": [
    "CortexEmbeddings789_2"
  ]
}

Error Responses

All endpoints return consistent error responses following the standard format. For detailed error information, see our Error Responses documentation.

Authorizations

Authorization
string
header
required

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

Body

application/json
tenant_id
string
required

Unique identifier for the tenant/organization

Example:

"tenant_1234"

sub_tenant_id
string
required

Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.

Example:

"sub_tenant_4567"

source_id
string | null

Optional source ID to filter by (mutually exclusive with chunk_ids)

Example:

"CortexDoc1234"

chunk_ids
string[] | null

Optional list of chunk IDs to filter by (mutually exclusive with source_id)

Example:
[
"CortexEmbeddings123_0",
"CortexEmbeddings123_1"
]
output_fields
string[] | null

Optional list of fields to return in results (default: chunk_id, source_id, metadata)

limit
integer
default:100

Maximum number of results to return

Required range: 1 <= x <= 10000
Example:

1

Response

Successful Response

source_id
string
required

Source identifier

Example:

"CortexDoc1234"

embedding
RawEmbeddingVector · object

Embedding payload with chunk id and vector (if set)

score
number
default:0

Similarity score

Example:

1

distance
number
default:0

Vector distance

Example:

1

metadata
Metadata · object

Metadata associated with the embedding