The estimate includes input as well as output
A long message history can require a substantial reservation even when you want a short answer. The quote uses a conservative input bound and the requested output ceiling, then confirmed completion settles against measured token usage. The default output ceiling is 256 tokens when max_tokens is omitted.
What to do next
- 01
Choose a useful answer length
Set max_tokens for the actual task, such as a short label or a longer explanation. Avoid requesting the maximum for every trivial operation merely because it is available.
- 02
Quote the complete conversation
Send the actual messages and output ceiling to /quotes. Review the resulting credits and usage ceiling before choosing an approved max_credits value.
- 03
Compare the final receipt
After confirmed completion, retain measured tokens, reserved_credits and final credits. Explain unused reservation returns separately from a failed-job refund.
A concrete example
Illustrative choice: a short caption task requests max_tokens 128 but includes a long brief. Its total estimate includes that input. Raising max_tokens to 4096 would increase the reservation without making the caption inherently better.
The two ceilings and the measured receipt
| Value | Meaning |
|---|---|
| max_tokens | Requested output-token ceiling, 1–4096 |
| max_credits | Approved per-request credit reservation ceiling |
| usage.prompt_tokens | Confirmed measured input tokens |
| usage.completion_tokens | Confirmed measured output tokens |
| reserved_credits | Initial accepted credit reservation |
| credits | Final settled charge when confirmed |
Before you call it ready
- Length and spending controls are labeled separately.
- Input history is included in estimation.
- Final usage is not assumed to equal the ceiling.
When to stop or choose another method
If the quote exceeds approval, shorten the task or obtain a deliberate revised approval. Do not automatically raise max_credits simply to make the request pass.
