Skip to main content

Embeddings

POST https://gateway.primexos.com/v1/embeddings

OpenAI-compatible embeddings for RAG, semantic search, and codebase indexing.

OpenAI-compatible

Accepts the standard OpenAI Embeddings parameters. Primex differences: authenticate with your prx- key and set model to a Primex model ID. See Errors & Limits for status codes.

Request​

curl https://gateway.primexos.com/v1/embeddings \
-H "Authorization: Bearer prx-YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "text-embedding-3-small",
"input": "Primex is a metered AI gateway."
}'

Models and billing​

Embedding models differ in vector dimensions, language coverage, input limits, and token rate. Discover the enabled inventory and current values from the live catalogue. Embeddings are billed from reported input tokens.

Cohere Embed V5​

Cohere Embed V5 Fast and Pro are being added for text embeddings. Check the live catalogue for their current availability. Fast suits retrieval queries; Pro suits document indexing, and both share a compatible embedding space.

For these models, input is a nonempty text or a list of up to 96 nonempty texts. Optional dimensions accepts 256, 512, 768, 1024, 1536 or 2048; encoding_format accepts float or base64 for the returned vectors. These models return 1,536 dimensions by default. Inputs that exceed the model's limit are rejected instead of silently truncated. Image, data-URI, mixed text/image and token-array inputs are unsupported. Native Cohere controls such as input_type and truncate are rejected; use the OpenAI request fields above. Billing uses reported text input tokens.

Response​

{
"object": "list",
"data": [{"object": "embedding", "index": 0, "embedding": [0.0021, -0.017, 0.004]}],
"model": "text-embedding-3-small",
"usage": {"prompt_tokens": 8, "total_tokens": 8}
}

The example abbreviates the vector to three values; real responses contain the selected model's full vector dimensions.