Skip to main content
POST
Create a completion (legacy)
OpenAI deprecated this endpoint. It exists so older SDK pins and scripts keep working — use /v1/chat/completions for anything new.

What it is

An adapter over the chat endpoint, not a separate path. prompt becomes a single user message, and choices[].message.content comes back as choices[].text. Models, pricing, streaming and failover are identical, because the request goes through exactly the same pipeline. One difference: usage (with usage.cost) comes back only on non-streaming calls. The legacy stream shape has no usage frame, so a streaming caller does not see it.

Three things return 400 instead of guessing

best_of and logprobs are accepted and ignored — their absence is visible in the response, so there is nothing to guess about.

Streaming

Supported, in the legacy chunk shape:
A frame that carries only a role or a tool call has no text and no finish_reason, so it is dropped rather than emitted as an empty chunk.