Skip to main content
Credits are the only currency on TokenChange. You spend them when you call endpoints and earn them when others call yours.

Add credits

Open Billing and enter a code under Add credits to redeem a promo code. Card payments aren’t available yet.

How a request is priced

Each endpoint sets an input, output and cached input price in USD per million tokens. After a request finishes, its cost is calculated from the token usage the endpoint reported:
  • Prompt tokens served from the provider’s prompt cache are charged at the cached input price.
  • The remaining prompt tokens are charged at the input price.
  • Generated tokens are charged at the output price.
The total is rounded down to a millionth of a dollar and converted to credits. You pay the prices of the endpoint that served the request, whichever way it was routed.
The calculator uses the same formula as billing. Your actual token counts come from the endpoint that served the request.

What isn’t billed

  • Requests that fail before any output is delivered, including attempts that failed over to another endpoint.
  • Requests you cancel before any output arrives.
Once output has started, the request is billed even if you disconnect. TokenChange finishes reading the response so the usage is counted.

Balance

Requests are refused with 402 insufficient_credits while your balance is zero. Nothing is reserved before a request starts, so a request that begins with a small balance can cost more than you have left. In that case your balance stops at zero; it never goes negative. Turn on Billing emails in Settings to hear about credits added and low balances.

Transactions

Billing lists every change to your balance. Filter by type: Read the same data from code with GET /v1/balance and GET /v1/transactions.