The xAI console
On this page
Your central dashboard
The xAI console, at console.x.ai, is where you manage your API usage. It brings together key management, usage tracking, billing, and testing tools. Mastering it will save you nasty surprises on your bill.
API key management
The API Keys section lets you:
- Create new keys with a descriptive name
- Revoke compromised or unused keys
- See the list of all your active keys (without showing their full value)
Each key is shown only once, when you create it. Get into the habit of copying every new key into your secrets manager right away.
Usage monitoring
The usage dashboard shows in real time:
- The number of requests sent per period
- The number of tokens consumed (input and output separately)
- The cost of each call
- The breakdown by model used
Understanding costs
The API returns the cost of each request in the response itself. Two units coexist, depending on the endpoint:
- cost_in_usd_ticks (chat/completions endpoint): 10 billion ticks = 1 dollar
- cost_in_nano_usd (responses endpoint): 1 billion = 1 dollar
The console translates these values into dollars so they’re easier to read.
Reasoning tokens
Reasoning models (grok-4.20-0309-reasoning) generate internal tokens for their thinking. These tokens are counted in reasoning_tokens and are billed, even though they don’t appear in the final answer. The console shows this breakdown for each request.
The tokenizer
The console includes an interactive tokenizer where you can paste text and see how many tokens it represents. It’s useful for:
- Estimating the cost of a prompt before sending it
- Optimizing the length of your system instructions
- Understanding how the model splits your text
Note that inference endpoints add internal tokens for processing, so the number the tokenizer shows may be slightly lower than what you’re billed for.
Billing
The Billing section handles both payment modes.
Prepaid credits
You buy an amount of credits in advance, and every API call is deducted from your balance immediately. Credits are non-refundable unless the law requires otherwise.
Monthly billing
Usage beyond your credits is billed at the end of the month. Check your billing information before you start, because it can’t be changed retroactively on an invoice that’s already been issued.
Team management
The console lets you create teams to share API access. Each team has its own API keys and its own usage tracking, which makes it easier to split costs within an organization.
Key takeaways
- The console.x.ai console brings together keys, monitoring, and billing
- Watch the input/output/reasoning breakdown to keep costs under control
- The tokenizer helps you estimate costs before sending
- Prepaid credits are non-refundable
- Check your billing information before any significant use