The short version
- Make the key on the API Keys page of the xAI console, in the team you want charged.
- Buy credits on Billing, and leave the invoiced billing limit at $0, so spending stops at what you bought.
- In Runner, an owner or admin pastes it under Settings, then LLM providers, and presses Connect.
- Grok runs on a key you connect, whichever way your plan pays for AI.
Make an xAI account, and buy credits
xAI's developer console is at console.x.ai. Usage, billing and keys belong to a team there: you start in a Personal Team, named in the console's top bar, and the team pays for its keys from its credits.
Sign up
Sign up for an account at console.x.ai.
Buy credits
Open Billing, then API spend management, and buy credits by card or bank transfer. A bank transfer takes 2 to 3 business days to arrive.
Create the key in the team you want charged
Check the team in the console's top bar first. A key belongs to the team it's made in, and stays with that team even if the person who made it is removed.
Open API Keys
Open API Keys from the sidebar.
Create the key
Create an API key on that page.
Copy it somewhere safe
Treat it like a password or a card number, and keep it where only you can reach it.
Keep xAI's spending inside what you bought
Two billing settings decide how far spending can go at xAI: the invoiced billing limit, and auto top-up.
Leave the invoiced billing limit at $0
It starts at $0, on Billing, then API Credits. Left there, only the credits you bought are spent, and xAI rejects requests once they run out. Raising it turns on monthly invoiced billing, up to the limit you set.
Cap auto top-up, if you turn it on
Auto top-up buys credits when your balance drops below an amount you set. Choose the top-up amount, at least $5, and the most it may buy in a month.
The warning
The API spend management card warns you once you've used four fifths of the monthly limit you set.
Paste the key into Runner, under Settings, then LLM providers
The key belongs to your Runner organization, so every product in it can use the key, and only an owner or admin can connect one. Runner encrypts it before storing it and never shows it again.
A key you connect is used before credits, even on AI included.
Open LLM providers
In Runner, open Settings, then LLM providers, under What the AI uses.
Find the xAI card
If it's folded under More providers, open it. Paste the key into xAI API key.
Press Connect
Runner tells you straight away if xAI turns the key down.
Keep the key secret
xAI asks you to treat API keys as sensitive information, like passwords or credit card details.
- Don't share a key between teammates.
- Keep it out of source code and public repositories.
- xAI works with GitHub's secret scanning: if your key turns up in a leak, xAI disables it and emails you.
- Paste it only into Runner's key box, never into a chat, an email or a support ticket.
Swap the key for a new one, or switch it off
xAI suggests rotating keys regularly. Make the new one before the old one goes.
Make the new key
On API Keys, create a new key in the same team.
Swap it in Runner
On the xAI card in LLM providers, press Disconnect, then Confirm disconnect, and paste the new key and Connect. Disconnecting stops your team using the old key at once.
Disable or delete the old key
In the API Keys table, click the three dots beside the old key, then Disable key to switch it off for now, or Delete key to remove it for good.
Grok runs on your key, whichever way you pay
Grok runs on a key you connect, whether your plan has AI included or not.
Every plan comes two ways, AI included or your own key, and you can change your choice later in Settings. The page on choosing puts the two side by side.
AI included or your own key: help me chooseGive your business a growth team.
Create your account and pick a plan. Your team is built once the plan is paid.

