Chat completions
POST /v1/chat/completions — the primary endpoint for all models.
Request body
json
{{
"model": "claude-sonnet-5",
"messages": [
{{"role": "system", "content": "You are a concise assistant."}},
{{"role": "user", "content": "Summarise this in one line."}}
],
"max_tokens": 2048,
"temperature": 0.2
}}Supported parameters
model,messages,max_tokens,temperature,top_pstream,stop,presence_penalty,frequency_penaltytools,tool_choice,response_format
Response
Standard OpenAI chat completion object with an added billing_usage block describing the upstream token counts used for charging.