Virtual keys & auto keys
All access to Coco Router is through virtual keys managed on the Virtual Keys page.
Creating a key
- Open Virtual Keys → + Create New Key.
- Set a Key Alias — this is how the key appears in dashboards and logs.
- Optionally set Max Budget (USD, lifetime), an expiry, and a model allow-list.
- Copy the
sk-…secret — it is shown only once. The list page shows only a masked form.
Auto keys (universal auto-routing)
If the alias starts with auto (e.g. auto-cocohr, auto-website), the key becomes a
universal auto-routing key:
- Every chat request through it is classified and routed by complexity.
- The model name the calling app sends is ignored —
gpt-4o,gpt-3.5-turbo,claude-2, anything: the router substitutes the tier's model. - Non-chat endpoints (audio, embeddings) are not hijacked — they pass through to their real models. See Audio & embeddings.
Alternatively, set auto_route: true in the key's metadata for the same behavior with any
alias.
Keys without the auto flag route only when the caller explicitly asks for the router
model (auto, smart-ai, or default); explicit model names pass through unchanged —
useful for power users who want to force a specific model.
Budgets and expiry
- Max Budget is a hard lifetime cap — once spend reaches it, the key stops working. Always set one on keys embedded in client-side code or shared externally.
- Expiry (
durationat creation, e.g.30d) disables the key after the period. - Budgets and spend are visible per key on the Dashboard, including a progress bar that turns amber at 70% and red at 90%.
Managing keys
Block, unblock, change budget, or delete any key from the Dashboard key table (these actions prompt for the admin password), or use the native Virtual Keys page for full key settings.