Skip to content
Rapid Router
← API reference

Reasoning models

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

15Reasoning models

Some models think before they answer. Those thinking tokens are billed as output by every provider we route to, and they are usually not shown to you. We report them separately at usage.completion_tokens_details.reasoning_tokens so the bill is explicable. They are counted, never charged twice.

The failure worth knowing about: set max_tokens too low on a reasoning model and it can spend the entire budget thinking, then return an empty string with finish_reason: "length". The request is billed and nothing in the standard response explains it. We add a warning that says so:

"warning": {
  "code": "reasoning_consumed_budget",
  "message": "The model spent all 5 output tokens reasoning and had none left
              to answer. Raise max_tokens, or pick a non-reasoning model.
              This request was still billed."
}

Give reasoning models room. A budget that is generous for a normal model can be nothing at all once thinking is paid for first.