Skip to content
Rapid Router
← API reference

Chat completions

Part of the Rapid Router API reference. One OpenAI-compatible endpoint, https://rapidrouter.ai/api/v1, in front of every model in the catalog.

03Chat completions

POST /chat/completions. The response envelope is the standard one, with an extra provider field telling you which upstream actually served it.

{
  "id": "msg_011CeHkp77djK1hiHwaAy22u",
  "object": "chat.completion",
  "model": "anthropic/claude-sonnet-5",
  "provider": "anthropic",
  "choices": [
    { "index": 0, "message": { "role": "assistant", "content": "..." }, "finish_reason": "stop" }
  ],
  "usage": {
    "prompt_tokens": 18,
    "completion_tokens": 96,
    "total_tokens": 114,
    "cost": 0.000996
  }
}