Skip to main content
Version: 1.8.0

Create a legacy text completion

POST 

/v1/completions

Accept one string prompt and return one OpenAI-compatible legacy text completion. DVARA wraps the prompt as a user message, then runs the same configured policy, PII, guardrail, budget, admission, routing, cache, response-control, audit, usage, and cost path as a synchronous /v1/chat/completions call.

This endpoint deliberately supports only the legacy shape that maps without changing its meaning. prompt must be one string; prompt arrays and token arrays are refused. stream must be absent or false, and n and best_of must be absent or 1. Unsupported forms return HTTP 400 with unsupported_capability before provider dispatch. user is accepted for client compatibility but ignored; DVARA attributes governance and usage from the workspace API key.

Request

Responses

One legacy text completion