Docs / Guides
Chat Completions vs Responses
Which OpenAI format to use with Cent AI, how conversation state works, and how usage differs.
Last updated
Short answer
Both formats work with the same API key, the same base URL https://api.cent-ai.dev/v1 and the same prices. Pick the one your tool or SDK already speaks.
| Use | When |
|---|---|
Chat Completions POST /v1/chat/completions | Your tool or code already uses messages. Most tools and SDKs support it |
Responses POST /v1/responses | Your tool or code is built on the Responses API, with input and previous_response_id |
The format does not change the price of a request. The cost depends on the model and the tokens, see Pricing.
How the two differ
| Topic | Chat Completions | Responses |
|---|---|---|
| Input field | messages | input |
| Conversation history | You send the whole history in messages on every turn | You send the whole history, or pass previous_response_id |
| Response object | chat.completion with choices[] | response with output[] |
| Stream end | Final chunk, then data: [DONE] | response.completed event |
| Error after a stream started | Error frame, then data: [DONE] | response.failed event |
Every request field, including tools, reasoning and store, is passed to the model as is.
Conversation state
Cent AI does not store conversation or response state.
- Chat Completions is stateless: each request carries the full conversation.
- Responses:
previous_response_idis passed to the model unchanged, andstoreis passed when the model supports it. Whether a previous response can be found depends on the model, not on Cent AI. If you need the conversation to survive on any model, send the full history ininput.
Conversations in both formats keep going to the same route between turns, so the model's prompt cache can be used. You do not add a field for this. See Prompt caching.
Usage fields
Both formats add usage.cost, the amount charged in USD. The token fields have different names.
| Meaning | Chat Completions | Responses |
|---|---|---|
| Input tokens | usage.prompt_tokens | usage.input_tokens |
| Of which read from cache | usage.prompt_tokens_details.cached_tokens | usage.input_tokens_details.cached_tokens |
| Output tokens | usage.completion_tokens | usage.output_tokens |
| Of which reasoning, when reported | usage.completion_tokens_details.reasoning_tokens | usage.output_tokens_details.reasoning_tokens |
| Total | usage.total_tokens | usage.total_tokens |
| Cost in USD | usage.cost | usage.cost |
"usage": {
"prompt_tokens": 10000,
"prompt_tokens_details": {"cached_tokens": 9000},
"completion_tokens": 800,
"total_tokens": 10800,
"cost": "0.000363000"
}
Usage in a stream
| Format | Where usage appears |
|---|---|
| Chat Completions | In a last chunk, only when you send stream_options.include_usage: true. You are charged either way |
| Responses | In the response object of the response.completed event |
Same request in both formats
curl https://api.cent-ai.dev/v1/chat/completions \
-H "Authorization: Bearer $CENT_AI_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-6-sol","messages":[{"role":"user","content":"Hello"}]}'
curl https://api.cent-ai.dev/v1/responses \
-H "Authorization: Bearer $CENT_AI_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-6-sol","input":"Hello"}'
Anthropic tools and SDKs use a third format, Messages, on the same host.