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
- 200
- 400
- 401
- 402
- 403
- 429
- 502
One legacy text completion
A required field is missing, no provider can serve the model, or the request uses an unsupported legacy shape.
A key is required. Missing, invalid, revoked, or expired keys are refused.
The workspace's hard budget cap is exhausted (BUDGET_CAP_HARD).
The key lacks completions:write (api_key_scope), or a configured policy, PII, guardrail, or IP rule refused the prompt.
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.