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

  1. Register at m.xairouter.com.
  2. Verify your email and activate your account.
  3. 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.