Create embeddings
POST/v1/embeddings
Generate vectors through the OpenAI integration (text-embedding-*
models) and Ollama (ollama/ models). The accepted
input shapes are one string, an array of strings, one token-ID array,
or an array of token-ID arrays.
DVARA maps each string to a separate text message and runs the live
request-governance preamble. A configured PII REDACT action changes
the text sent for embedding and therefore changes the vector. Token IDs
contain no text that PII or text guardrail scanners can inspect, so they
pass through unchanged while the non-text request controls still run.
Text input reserves an estimated token count at admission, as a chat call does; token-ID input reserves none. After the provider responds, DVARA settles the reported total against that reservation in the token window and records input usage and cost when those stores are configured. A vector response has no generated text, so the response-text governance pipeline does not run.
Request
Responses
- 200
- 400
- 401
- 402
- 403
- 413
- 429
- 500
- 502
- 503
Embeddings response
Missing fields, no embedding-capable provider (no_provider), or unsupported encoding_format (unsupported_capability).
No key was sent (api_key_required), or the key is unknown (invalid_api_key), revoked (api_key_revoked) or expired (api_key_expired).
A hard budget cap is exhausted (budget_cap_hard), the call would cost more than the per-call ceiling (per_call_cost_exceeded), or, without a licence, the monthly call band is used up (license_token_cap_exceeded, type token_cap_exceeded).
The key's nonempty scope list does not cover the operation (api_key_scope; chat, Responses, completions and the Cursor route need completions:write, embeddings need embeddings:write); a policy rule (policy_denied), guardrail (guardrail_blocked, hallucination_detected, grounding_unavailable), IP rule (ip_access_denied) or data-residency rule (data_residency_violation) refused the call; PII tokenization or redaction was needed but unavailable (pii_tokenize_unavailable, pii_redact_unavailable); or the workspace is suspended (workspace_suspended), over its cap (workspace_cap_exceeded), or must use its own provider credential (workspace_credential_required). A PII BLOCK is 400 pii_detected instead.
The input is over a configured guardrail size limit (input_too_large), such as messages per request, message length or input tokens.
The key's rate limit is reached (rate_limit_exceeded, with a Retry-After header), priority admission control throttled the request (priority_throttled), or the provider is rate limiting the call (provider_rate_limited, with Retry-After when the provider gave one).
Response Headers
Seconds to wait before retrying, when known.
A configured guardrail plugin failed (guardrail_plugin_error), or the key has no id in the gateway's configuration (api_key_misconfigured).
Every configured provider on the route (and every fallback) has failed.
The provider's circuit breaker is open (provider_circuit_open), no fallback provider can serve what the request needs (failover_capability_mismatch), or the workspace's own provider credential cannot be read (workspace_credential_unavailable).