{
"object": "list",
"data": [
{
"object": "embedding",
"index": 1,
"embedding": [
123
]
}
],
"model": "<string>",
"usage": {
"prompt_tokens": 2,
"total_tokens": 2,
"cost_usd": 1,
"breakdown": {
"text": 1,
"image": 1,
"audio": 1,
"video": 1
}
},
"processor_revision": "<string>",
"embedding_protocol": "embedding-multimodal-v1",
"billing_pending": true,
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Create embeddings
OpenAI-compatible embeddings with input-only billing. Existing text models accept a string or string array. embeddinggemma-2 also accepts ordered text, image, audio, and video content parts and returns one normalized vector per top-level item. Omitted EG2 input_type defaults to query; unspecified explicitly opts out. Legacy omission retains each model’s existing behavior. The model is default off and is callable only when it appears in GET /v1/models?type=embedding. Authenticate with an X-API-Key carrying grid:write (prepaid credits), or omit it and retry the 402 challenge with X-Payment. EG2 input and results are persisted only as sealed envelopes. Terminal input becomes purge-eligible after 30 minutes and results after one hour; the hourly purge makes practical upper bounds about 90 minutes and two hours. Plaintext node error text is never persisted.
{
"object": "list",
"data": [
{
"object": "embedding",
"index": 1,
"embedding": [
123
]
}
],
"model": "<string>",
"usage": {
"prompt_tokens": 2,
"total_tokens": 2,
"cost_usd": 1,
"breakdown": {
"text": 1,
"image": 1,
"audio": 1,
"video": 1
}
},
"processor_revision": "<string>",
"embedding_protocol": "embedding-multimodal-v1",
"billing_pending": true,
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Headers
Body
Optional model-specific output dimension. Omit for the model's native dimension. Unsupported model/dimension pairs return 400.
768, 512, 256, 128 Response
One finite, unit-normalized float vector per input item, ordered by index.
Was this page helpful?
