
Best Practices for Managing API Costs
In the token settings you can configure a maximum quota per token, so a runaway integration can never drain your balance.

Cache repetitive results 馃捑
If your app makes the same request often, cache the answer. This can cut costs dramatically.
Savings playbook
| Tactic | Typical saving |
|---|---|
| Set token quotas | High |
| Cache repeated calls | Medium-High |
| Batch small requests | Medium |
| Use mini models | Medium |
Batch where possible 馃М
Combine multiple small tasks into a single request with a structured output instead of calling the API many times.
Watch your top spenders 馃憖
Check the log page to see which tokens and models consume the most credits, then optimize those paths first.
Frequently asked questions
What is the safest cost setting?
A hard quota per token. It caps spend even if an integration misbehaves.
How often should I check the logs?
At least weekly, or daily if your app is high-traffic.
Do failed requests still cost credits?
Yes, if tokens were consumed before the failure. Retries can add up, so watch them.
Can I get cost alerts?
Usage-based alerts are on the roadmap and will arrive later this year.