How a request is charged
You pay per token at the model’s price. Requests that fail before the model answers cost nothing.
Il centro assistenza è scritto in inglese e in olandese. Stai leggendo la versione inglese.
- Each model has a price in US dollars per million input tokens and per million output tokens, on nexrouting.com/models.
- We charge the tokens the model reports for your request: input tokens × input price + output tokens × output price, rounded up to a millionth of a dollar.
- Some models have a higher rate for very long prompts, or when they reason before answering. Our price follows the same factor. Writing to a prompt cache can cost extra on models that support it.
- Cached input tokens are currently charged at the normal input price.
- If the model doesn’t report its tokens, we estimate them from the length of the text: about four characters per token.
Before and after
- Before we send a request, we check that your balance is above zero and that the prompt alone fits in it. If not, you get
402and pay nothing. - A request that’s already running is always finished, so your balance can end slightly below zero. Your next top-up settles that.
- Requests we refuse (such as
400,401,402,403,404or429) and errors before the model answers cost nothing. - If a streamed answer breaks off, or your app stops it, you pay for the prompt and for what was generated until then.
Your usage log shows each request with its cost, failed ones too. Requests we refuse before we look at the model don’t appear in it: a missing, wrong or expired key, a paused account, going over the rate limit, or a body that isn’t valid JSON or is over 32 MB.