Skip to content

Billing ​

Balance ​

The account balance is in US dollars (USD). Top up or redeem a code in the wallet. After each call finishes, the actual usage is deducted from the balance. When the balance is insufficient, requests return 403.

Billing methods ​

Models are billed in one of two ways. The model square shows which one each model uses.

Per token ​

Most text models are billed per token:

cost = official unit price × group discount × token count
  • Input, output, cache read and cache write are each calculated at their own unit price.
  • Some models are tiered by context length, with a higher unit price for long context. The model square shows the tier rules.
  • The group discount is written next to the group name. For example, "20% of the official price" means you are charged 20% of the official price.

Per call ​

Some image and video models charge a fixed fee per call, regardless of token count, for example Grok Imagine images.

Viewing charge details ​

The console usage log records the model, token, input and output token counts and charged amount of every call. You can filter by time, token and model.

Failed requests ​

Requests that return an error are not charged, for example parameter validation failures (400) or an invalid token (401).