Skip to main content
POST
/
v1
/
engines
/
{model}
/
embeddings
Embeddings (Gemini format)
curl --request POST \
  --url https://api.gravitex.ai/v1/engines/{model}/embeddings \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "<string>",
  "input": {},
  "encoding_format": "<string>",
  "dimensions": 123
}
'

Documentation Index

Fetch the complete documentation index at: https://docs.gravitex.ai/llms.txt

Use this file to discover all available pages before exploring further.

Introduction

Create embeddings with the model specified in the URL path. Request body matches the OpenAI-style fields. See also Embeddings (OpenAI format) (POST /v1/embeddings).

Authentication

Authorization
string
required
Bearer Token, e.g. Bearer sk-xxxxxxxxxx

Path parameters

model
string
required
Model or engine ID in the path

Request body

model
string
required
Model name (may match path model)
input
string | array
required
Text to embed
encoding_format
string
default:"float"
float or base64
dimensions
integer
Output dimensions

Example

curl -X POST "https://api.gravitex.ai/v1/engines/text-embedding-ada-002/embeddings" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-xxxxxxxxxx" \
  -d '{
    "model": "text-embedding-ada-002",
    "input": "Hello, world"
  }'

Response

Same shape as POST /v1/embeddings (object, data, model, usage).