Chat Completions
Call the available OpenAI-compatible inference endpoint with a stable model ID and a retry-safe request key.
Endpoint
POST /v1/chat/completionsThe request must include a bearer API key and an Idempotency-Key header. The API accepts a normalized chat request with a public model ID and messages.
{
"model": "deepseek/deepseek-v4-flash",
"messages": [
{ "role": "user", "content": "Summarize this note." }
]
}Response
OurToken returns an OpenAI-compatible chat completion. The model field is always the official public ID that you requested, not a provider or route identifier.
{
"id": "chatcmpl_…",
"object": "chat.completion",
"model": "deepseek/deepseek-v4-flash",
"choices": [
{
"index": 0,
"message": { "role": "assistant", "content": "…" },
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 184,
"completion_tokens": 63,
"total_tokens": 247,
"customer_charge_micros": 0
}
}customer_charge_micros is the final settled charge in millionths of the wallet currency. The record retains normalized meters and the price snapshot used for settlement; it does not retain your prompt or completion content in the billing ledger.
Compatibility boundary
This endpoint is OpenAI-compatible for Chat Completions. Support for another OpenAI endpoint or protocol is not implied by that compatibility.