PATCH
/
upload
/
update_embeddings
cURL
curl --request PATCH \
  --url https://api.usecortex.ai/upload/update_embeddings \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: <content-type>' \
  --header 'accept: <accept>' \
  --data '{
  "embeddings": {
    "CortexEmbeddings123_0": [
      0.1,
      0.2,
      0.3,
      0.4,
      0.5
    ],
    "CortexEmbeddings123_1": [
      0.6,
      0.7,
      0.8,
      0.9,
      1
    ]
  }
}'
{
  "success": true,
  "message": "Embeddings update message pushed to SQS.",
  "chunk_ids": [
    "CortexEmbeddings123_0",
    "CortexEmbeddings123_1"
  ],
  "batch_id": "CortexEmbeddings123",
  "updated_count": 2
}

Requirements

  • Maximum dimensions: 2000 rows × 3024 columns; i.e. 2000 chunks with a maximum dimension of 3024
  • Format: Dictionary with chunk IDs as keys and embedding arrays as values. These chunk IDs should match the ones that you got on inserting the embeddings.
  • Batch constraint: All chunk IDs must belong to the same batch/source
  • Chunk ID format: Must be valid strings in format {batch_id}_{index}
  • Consistency: All embedding vectors must have the same dimension
  • Values: All embedding values must be numeric (int or float)

Sample Request

curl --location --request PATCH 'https://api.usecortex.ai/upload/update_embeddings?tenant_id={TENANT_ID}&sub_tenant_id={SUB_TENANT_ID}' \
  --header 'Authorization: Bearer {API_KEY}' \
  --header 'accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
    "embeddings": {
      "CortexEmbeddings123_0": [0.1, 0.2, 0.3, 0.4, 0.5],
      "CortexEmbeddings123_1": [0.6, 0.7, 0.8, 0.9, 1.0]
    }
  }'

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

Query Parameters

tenant_id
string

Tenant identifier

sub_tenant_id
string

Sub-tenant identifier

Body

application/json

Response

200
application/json

Embeddings updated successfully

The response is of type object.