Skip to main content
POST
text.embed-contextual

Authorizations

Authorization
string
header
required

API key: sk_live_…

Headers

Idempotency-Key
string

Optional. A retry with the same key returns the stored result.

Maximum string length: 255
Pramaan-Max-Price-Micro
string

Optional. The most this request may be priced at, in micro-USD (a whole number above 0). It replaces the capability's own price ceiling for this request, lower or higher. Sources that could cost more are left out; when none is left the answer is 400 with the lowest limit that would work.

Pattern: ^[1-9]\d{0,14}$

Body

application/json
documents
object[]
required

One to eight documents; at most 64 chunks and 32,768 UTF-8 bytes in total.

Required array length: 1 - 8 elements
inputType
enum<string>
default:document

Queries must have one chunk per document.

Available options:
query,
document
model
enum<string>

Fixed embedding model or stable alias. Omission uses the project pin or embed-17 at 1,024.

Available options:
fast,
best,
embed-17,
embed-21
quality
enum<string>

Legacy alias; must agree with model when both are supplied without a space. Ignored when space is sent.

Available options:
fast,
best
dimensions
integer

Requested vector length; unsupported lengths are refused.

Required range: 2 <= x <= 3072
space
string

Earlier contextual space to keep this profile fixed. Old aliases and quality are ignored; a fixed name or size must match the space.

Pattern: ^sp_[0-9a-f]{12}$

Response

The result

model
enum<string>
required

Fixed identity of the embedding model that answered.

Available options:
embed-17,
embed-21
space
string
required

Opaque identity of the model and contextual chunking profile.

Pattern: ^sp_[0-9a-f]{12}$
dimensions
integer
required

Vector length.

Required range: 2 <= x <= 3072
documents
object[]
required

One result per supplied document, in order.

usage
object
required

Usage across all documents.