xAI (BYOK)
How to create an API key for xAI and add it to AnyRouter via Bring Your Own Key.
xAI is a supported BYOK provider. Bring your own API key string, and AnyRouter routes your requests through it — no platform credits are charged for BYOK-backed calls.
Get your API key
- Sign in to the xAI Console.
- Open API Keys.
- Click Create API Key and copy the secret (
xai-...).
Add it to AnyRouter
- Go to Dashboard → BYOK.
- Find xAI under Available and click Add key.
- Paste your key into the API key field.
- Create key: xAI console
- Click Save. AnyRouter runs a live validation call against xAI before storing the key — if it fails, the dialog shows the upstream error and the key isn't saved.
Related
- BYOK Provider Setup Guide — the full provider list and the general flow
- Bring Your Own Key (BYOK) — routing precedence, load balancing, and costs
- Free-tier aggregation — combine free tiers behind one preset