Create embeddings
POST/v1/embeddings
Generate vectors through the OpenAI provider integration. 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.
Embeddings reserve no estimated tokens at admission. After the provider responds, DVARA reconciles the reported total into 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
- 429
- 502
Embeddings response
Missing fields, no embedding-capable provider (no_provider), or unsupported encoding_format (unsupported_capability).
A key is required. Missing, invalid, revoked, or expired keys are refused.
The workspace's hard budget cap is exhausted (BUDGET_CAP_HARD).
Request was blocked by an active policy rule (POLICY_DENIED, PII_DETECTED, GUARDRAIL_BLOCKED, IP_ACCESS_DENIED).
Per-key rate limit reached, or priority admission control throttled the request (PRIORITY_THROTTLED).
Every configured provider on the route (and every fallback) has failed.