Usage & Billing
Usage & Billing
JoyToken records tokens, Credits, model, tier, and API key attribution after successful model calls.
What to Check
Billing Fields
metadata is always an array. A single-model response has one entry; an orchestration response has one entry per task. Sum billing.credits_used across all entries for the total cost.
Streaming appends standalone metadata events before [DONE]: a single-model response emits one event whose value is a single-element array, while an orchestration response emits one event per task whose value is a single object.
Usage Attribution
Use one API key per environment and workflow:
Cost Control
Balance and Budget
402 insufficient_quota usually comes from wallet balance, key budget, or tier balance. Check in this order:
- Personal or organization wallet balance.
- Balance for the requested tier.
- Daily / weekly budget on the API key.
- If routing returns no candidate, check tier, policy, wallet, and key budget.
- If
premiumis too expensive, trystandardoreconomy.
