π—π€πˆ π—π€ππˆ

π‘€π‘Žπ‘›π‘Žπ‘”π‘’π‘šπ‘’π‘›π‘‘ πΆπ‘œπ‘›π‘ π‘œπ‘™π‘’

Don't have an account?Sign up·User Manual

Activation code and API key will be sent to this email. (May be delayed or filtered as spam.)

Verification Code Sent!

Please click the activation link in your email to complete registration.

May be delayed or in spam.

Already have an account? Login now

Β© 2022-2026 XABC Labs

π—π€πˆ π—π€ππˆ

🌐 Supported AI Service Providers

OpenAI

platform.openai.com/docs

Anthropic

docs.anthropic.com

Cloudflare AI Gateway

developers.cloudflare.com

Perplexity

docs.perplexity.ai

Mistral AI

docs.mistral.ai

Grok AI

docs.x.ai

Gemini

ai.google.dev

Cohere

docs.cohere.com

DeepSeek

api-docs.deepseek.com

AI21

docs.ai21.com

✨ The XAI platform fully supports models from all the AI service providers listed above. With a single API key, you can seamlessly call AI models from any of these providers, enabling flexible and efficient AI application development.

πŸ’» SDK Code Examples

OpenAI SDK Example

import os
from openai import OpenAI

XAI_API_KEY = os.getenv("XAI_API_KEY")
client = OpenAI(
    api_key=XAI_API_KEY,
    base_url="",
)

completion = client.chat.completions.create(
    model="gpt-4o",
    messages=[
	{"role": "system", "content": "You are AI"},
	{"role": "user", "content": "What is the meaning of life, the universe, and everything?"},
    ],
)

print(completion.choices[0].message)

Anthropic SDK Example

import os
from anthropic import Anthropic

XAI_API_KEY = os.getenv("XAI_API_KEY")
client = Anthropic(
    api_key=XAI_API_KEY,
    base_url="",
)
message = client.messages.create(
    model="claude-sonnet-4-5-20250929",
    max_tokens=128,
    system="You are AI.",
    messages=[
	{
	    "role": "user",
	    "content": "What is the meaning of life, the universe, and everything?",
	},
    ],
)
print(message.content)

πŸ§ͺ cURL Examples

OpenAI /chat/completions

curl https://api.xairouter.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $XAI_API_KEY" \
  -d '{
    "model": "gpt-5.2",
    "messages": [
      {
        "role": "developer",
        "content": "You are a helpful assistant."
      },
      {
        "role": "user",
        "content": "Hello!"
      }
    ]
  }'

Anthropic /messages

curl https://api.xairouter.com/v1/messages \
  -H 'Content-Type: application/json' \
  -H 'anthropic-version: 2023-06-01' \
  -H "X-Api-Key: $XAI_API_KEY" \
  -d '{
    "max_tokens": 1024,
    "messages": [
      {
        "content": "Hello, world",
        "role": "user"
      }
    ],
    "model": "claude-sonnet-4-5-20250929"
  }'
Total Levels
-
Total Keys
-
Active Keys
-
Sleeping Keys
-

Add New Provider

We'll auto-fill the Level when a matching provider already exists so you can keep the same rotation group, but you can still override it anytime.
Selecting a preset fills the Provider URL and configuration type; you can still adjust everything afterwards.

Azure OpenAI Configuration

Provider should be your Azure endpoint, e.g.: https://your-resource.openai.azure.com

Model to deployment mapping, supports wildcards like gpt-4* (JSON format, optional)
API version mapping for different endpoints (JSON format, optional, leave empty to use system defaults)

Google Vertex AI Configuration

The Provider and SecretKey above are just placeholders, e.g.: https://aiplatform.googleapis.com, where SecretKey still needs to be 51 characters. The configuration below requires service account credentials and project information

Vertex AI endpoint URL including project and location information
Google Cloud Project ID
Service account email address
Service account private key (PEM format)

Provider List

Loading...

System Configuration Management

Model Pricing (Owner Overrides)

Provide only the deltas from system defaults. Applied immediately; requests prefer Owner overrides and fall back to defaults.

Override examples:
β€’ Override an existing model: {"ChatPricing":{"gpt-4o":{"InputText":4.5,"OutputText":12.5,"Rates":1}}}
β€’ Add a custom model: {"ChatPricing":{"my-model":{"InputText":1,"OutputText":2,"Rates":1}}}
β€’ Free model (Rates=0): {"ChatPricing":{"free-model":{"InputText":0,"OutputText":0,"Rates":0}}}

β€”
One-tap fill
Limits: total entries ≀ 1024, size ≀ 128k.

Subscription Plans (Monthly)

Push sellable monthly plans to the frontend. Prices β‰₯ 100000 hide the plan on the user side for temporary takedowns.

Fields: code, name, price_fen, rpm, rpd, tpd, allow_models, model_mapper (optional, default "*"), gear, level, level_mapper, credit_amount, duration_days, active (optional). Price is used for upgrade detection (higher price = better plan). Price β‰₯ 100000 hides the plan.

Basic Configuration

System notification email
Comma-separated list of API paths
Quick fill
Supports JSON; you can also enter "*" to clear all, or "-gpt-4o, -gpt-4o-mini" to remove specific models. Each model can have rpm, rph, rpd, tpm, tph, tpd limits. Leave empty to keep current settings.

Email Configuration

Mapping Configuration

Format: original_model=target_model, comma-separated (e.g., gpt-3.5*=gpt-4o-mini maps any gpt-3.5 request to gpt-4o-mini)
Format: model=group_number, comma-separated (e.g., gpt models are handled by provider group 1, claude models by group 2)
Format: primary_group=backup_group, comma-separated (When a primary group has > 5 errors in 1 min, it fails over to the backup group, and switches back after 60 mins)
Format: primary_model=backup_model, wildcard supported (e.g., gemini*=gpt-4o). When a model fails 5 times in 1 minute and no group failover applies, requests are temporarily remapped to the backup model and will auto-restore after 60 mins.

Create New Broadcast

Recent Broadcasts

No local records

Operation Logs

Time Action Target Account Details IP Address

Loading logs...

No operation logs found

Operation Result


        

Confirm Action

Edit Provider Key