Skip to main content
POST
/
embeddings
Embeddings
curl --request POST \
  --url https://api.redpill.ai/v1/embeddings \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "<string>",
  "input": [
    "<string>"
  ],
  "encoding_format": "<string>",
  "dimensions": 123
}
'

Create Embeddings

Generate vector embeddings from text for semantic search, similarity, clustering, and retrieval. Requests are served through the attested TEE gateway, which does not retain request bodies. Embedding requests route to a third-party provider; no embedding model runs on a verified confidential upstream today.
POST https://api.redpill.ai/v1/embeddings

Request Body

model
string
required
Embedding model id. See Supported models below.
input
string | string[]
required
Text to embed. Pass a single string or an array of strings for batch embedding.
encoding_format
string
float (default) or base64.
dimensions
integer
Optional output dimension count. Supported by openai/text-embedding-3-small and openai/text-embedding-3-large, which can return fewer dimensions than their default.

Example

curl https://api.redpill.ai/v1/embeddings \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/text-embedding-3-small",
    "input": "Confidential AI you can verify."
  }'

Batch input

Pass an array to embed several strings in one request. Results are returned in input order, each with its index.
curl https://api.redpill.ai/v1/embeddings \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/text-embedding-3-small",
    "input": ["first document", "second document"]
  }'

Response

{
  "object": "list",
  "data": [
    { "object": "embedding", "index": 0, "embedding": [0.0167, -0.0557, "…"] }
  ],
  "model": "openai/text-embedding-3-small",
  "usage": { "prompt_tokens": 8, "total_tokens": 8 }
}

Supported models

Model idDimensions
openai/text-embedding-3-small1536
openai/text-embedding-3-large3072
openai/text-embedding-ada-0021536
qwen/qwen3-embedding-8b4096
If a model id returns model_not_found, it is not currently routed.

Custom dimensions

openai/text-embedding-3-small and openai/text-embedding-3-large accept a dimensions parameter to return shorter vectors, which reduces storage and speeds up similarity search at some cost to quality.
curl https://api.redpill.ai/v1/embeddings \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/text-embedding-3-large",
    "input": "shorter vector",
    "dimensions": 1024
  }'
Keep one model and one dimension count per index. Vectors from different models are not comparable.

Models

Chat and confidential models.

Trust boundary

What the gateway protects.