Skip to main content
POST
media.embed

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
inputs
object[]
required

One to eight semantic items, one vector per item. Combined decoded files are limited to 20 MiB.

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

Retrieval role.

Available options:
query,
document
model
enum<string>

Fixed model name. fast and best mean embed-10. Omit to use the project choice, or embed-10 at 1024 dimensions for a new project.

Available options:
fast,
best,
embed-7,
embed-8,
embed-10,
embed-24
quality
enum<string>

Legacy alias; both values mean embed-10. Must agree with model without a space, and is ignored when space is sent.

Available options:
fast,
best
dimensions
integer

Requested dimensions; unsupported sizes are refused.

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

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

Pattern: ^sp_[0-9a-f]{12}$
allowExpensive
boolean
default:false

Explicitly allow audio, video and document processing. These require verified media facts and a sufficient cost ceiling.

Response

The result

model
string
required

Fixed name of the model that produced these vectors.

Pattern: ^embed-[1-9]\d*$
space
string
required

Opaque media embedding profile.

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

Vector length.

Required range: 2 <= x <= 3072
embeddings
number[][]
required

One vector per input, in order.

usage
object
required

Reported input usage.