Completions
CompletionsResource
Methods
Generates a legacy text completion from a raw prompt (a string or list of strings).
Use this endpoint for non-chat, prompt-in/text-out inference using the OpenAI text-completion
contract; use /v5/chat/completions when you have a structured messages array, /v5/responses for
the OpenAI Responses API, and /v5/inference for payloads that follow no OpenAI schema. The model is
selected from model given as vendor/name and routed to the matching per-vendor gateway. When
stream is set the response is delivered as server-sent events; otherwise a single text_completion
object is returned. Token usage is recorded for the account, read from the final chunk on streaming
responses.
Domain types
Usage statistics for the completion request.