Skip to main content
Version: 1.13.0-dev

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​

Embeddings response