Concepts
API keys
How Troviale API keys map to gateway access, spend tracking, and per-key budgets.
An API key is your credential for the gateway. It identifies the caller, authorizes the request, and ties every call to your account for metering.
What a key tracks
Each key independently records:
- Spend — the running cost of all requests made with it.
- Usage — request counts and token totals, per model.
- Budget — an optional hard ceiling on spend.
Because tracking is per-key, you can attribute cost to a specific app or environment just by looking at the key.
Validation
When a request arrives, the gateway validates the key, checks it has budget remaining, then routes to the target model. An invalid or over-budget key is rejected before any provider is called, so you are never billed for a request that could not run.
Lifecycle
- Create a key in the dashboard. The full value is shown once.
- Use it as a bearer token against the gateway endpoint.
- Revoke it when it is no longer needed. Revocation is immediate.
Keys do not expire on their own — they remain valid until revoked.