Skip to main content
Version: 1.8.0

Chat completion

POST 

/v1/chat/completions

OpenAI-compatible chat completions. Accepts any model the gateway has a provider for — gpt-*, claude-*, gemini-*, ollama/*, mock/*, and so on. Set stream: true to receive SSE deltas.

The gateway runs the full pre-dispatch pipeline (template resolution, budget enforcement, policy evaluation, PII scan, guardrails, priority admission, model downgrade, context window check) before any upstream call. A non-streaming response completes the post-dispatch pipeline before delivery. A stream relays events immediately when its configured controls are observational, or holds the complete response when a control can block or transform output. Set stream_options.include_usage: true to receive usage in the final chunk. DVARA also records exact terminal provider usage when available and estimates it otherwise.

Request​

Responses​

Chat completion