Quick Start
This page is for XAI Router (SaaS aggregation). If you need a BYOK multi-tenant gateway, see XAI Control Quick Start.
1. Sign up and get your XAI API Key
- Register at m.xairouter.com.
- Verify your email and activate your account.
- Create your XAI API Key in the console (shown only once).
2. Configure the API endpoint
Update your SDK/application base_url to XAI Routerโs unified endpoint:
- Base URL:
https://api.xairouter.com
3. Send your first request
# Replace YOUR_XAI_API_KEY with your own key
export XAI_API_KEY="sk-xxxx"
curl https://api.xairouter.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $XAI_API_KEY" \
-d '{
"model": "gpt-4o-mini",
"messages": [
{
"role": "user",
"content": "Hello, XAI Router!"
}
]
}'
4. Usage & billing
At m.xairouter.com, you can view:
- Real-time usage and model-level consumption
- Billing and top-up history
If you need full key ownership and multi-tenant governance, choose XAI Control.