ModelRefs / Chat Completion — AI Glossary
Chat Completion — AI Glossary
The primary LLM API endpoint that takes a list of messages and returns a model-generated assistant reply. Also called chat API or completions API.
Overview
The chat completion endpoint (POST /v1/chat/completions) accepts a messages array of role-content pairs and returns a choices array with the model's response. Key parameters: model, temperature, max_tokens, stop, stream, tools, response_format. The de facto standard API interface; supported by OpenAI, Anthropic (via compatibility), Groq, Together, and 50+ providers.
Reference details
| Topic | ecosystem |
|---|---|
| Also known as | chat API, completions API |
| Last reviewed | 2026-06-24 |
Related terms
Example: The endpoint has no memory, so you pay for it
Each call is stateless: the conversation exists only because your client resends it. If each turn averages 200 tokens, the tenth request carries nine prior turns — about 1,800 tokens of history — plus the new message, before the model reads a word of the actual question. Across a ten-turn conversation the resent history sums to roughly 9,000 tokens you are billed for repeatedly. That arithmetic is the entire motivation for prompt caching, and for summarising or truncating old turns rather than carrying them forever.
Commonly confused with
Chat completions replaced the older text completions endpoint, which took a single prompt string with no roles. Newer stateful endpoints reverse the trade by keeping conversation state server-side. “OpenAI-compatible” providers implement the chat completions shape but not always its full parameter set — tools, response formats and streaming semantics are the usual gaps.
When to use it
Reach for it when:
- Essentially all current LLM application code — it is the portable interface across providers
- Multi-turn interfaces, where roles carry the instruction and history distinction
- Tool calling and structured output, which are defined against this shape
Reach for something else when:
- Assuming the server remembers anything between calls
- Carrying unbounded history — cost and lost-in-the-middle effects both grow with it
- Porting between providers without testing: compatibility covers the shape, not the behaviour
Continue your research
Use these connected ModelRefs sections to compare alternatives, inspect implementation paths, and review the evidence and governance boundaries relevant to Chat Completion — AI Glossary.
Frequently asked questions
What is Chat Completion?
The primary LLM API endpoint that takes a list of messages and returns a model-generated assistant reply.
Is Chat Completion the same as chat API?
Yes — chat API, completions API are common aliases for Chat Completion.
What concepts are related to Chat Completion?
Closely related concepts include openai compatible, system message, streaming.