Skip to content

Usage and Billing

RouteAPI records billing information based on request usage, account balance, and available discounts.

Usually includes:

FieldDescription
prompt tokensInput tokens
completion tokensOutput tokens
total tokensTotal input and output tokens
cached tokensTokens that hit cache, if included in this response
discountIf the account has a discount, it is reflected in the final billed amount

Image, audio, video, asynchronous task, and similar requests may not be billed only by tokens. They may also be billed by:

  • Number of images
  • Image size
  • Audio duration
  • Video duration
  • Number of tasks
  • Actual processed amount

It depends on where the failure occurs:

ScenarioPossible billing
Invalid TokenUsually not billed
Insufficient user balanceUsually not billed
Request not processed by the platformUsually not billed
Request processed but returned an errorMay be billed
Streaming output interrupted midwayMay be billed by generated content
  • Request time
  • User and Token
  • prompt tokens
  • completion tokens
  • Billed amount
  • Discount information
  • Error information
  • Request latency