Getting Started with XAI Control (Cloud)
This document will guide you step-by-step through registering for the XAI Control cloud service, obtaining an API Key, and managing sub-accounts with fine-grained controls, helping you get started quickly.
1. Register an Account
- Open your browser and visit a.xaicontrol.com.
- Click "Register Now", enter your email address, and click "Send Verification Code".
- Log in to your email and find the email with the subject "Your XAI Verification Code" (Note: The email might be mistakenly marked as spam, so please check your spam folder as well).
- Click the "Click to Activate Account" button in the email. You will be redirected back to XAI Control with a success message.
- After successful activation, the system will automatically send another email to the same address with the subject "Welcome to XAI - Your Account is Ready!", which contains your exclusive XAI API Key.
2. Add a Provider Key
- Log in to a.xaicontrol.com.
- Go to "Providers" â "Add Provider Key".
- Fill in the following:
- Name (Optional): A custom name for easy management.
- Level: A positive integer for model grouping and categorization.
- Provider: The API Base URL of the model provider, for example:
- OpenAI:
https://api.openai.com
- Anthropic:
https://api.anthropic.com
- DeepSeek:
https://api.deepseek.com
- Google Gemini:
https://generativelanguage.googleapis.com
- OpenAI:
- SecretKey: The API Key from the corresponding provider, typically starting with
sk-
(orAIzaSy
for Google Gemini).
- Click "Add Provider Key". The system will encrypt and store this key in your dedicated data space.
3. Quick Test
After completing the steps above, you can use your XAI API Key to call the integrated AI services.
Important Prerequisite
The following examples show how to call OpenAI and Anthropic models respectively. Please ensure that you have added the corresponding Provider Key for the model provider you want to test (e.g., OpenAI, Anthropic) in Step 2. If you have only added the OpenAI key, the Anthropic example will not work.
Calling OpenAI Models
export XAI_API_KEY="Your-XAI-API-Key"
curl https://api.xaicontrol.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, world"}]
}'
Calling Anthropic Models
export XAI_API_KEY="Your-XAI-API-Key"
curl https://api.xaicontrol.com/v1/messages \
-H "x-api-key: $XAI_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{
"model": "claude-3-7-sonnet-latest",
"max_tokens": 1024,
"messages": [{"role": "user", "content": "Hello, world"}]
}'
4. Sub-Account Management (Fine-Grained Permissions and Quota Control)
XAI Control supports a multi-level sub-account system, making it easy for teams or clients to isolate resources and manage billing independently.
Please note that XAI Control has two management portals:
- Configuration Portal: a.xaicontrol.com (Registered users are primary accounts, used for configuring third-party AI Provider Key resources).
- Account Management Portal: m.xaicontrol.com (Primary accounts manage sub-accounts and quotas here; sub-accounts view their own usage here).
4.1 Create a Sub-Account
- The primary account logs in to m.xaicontrol.com and navigates to the "Create Sub-Account" page.
- Fill in:
- Sub-account username
- Sub-account email (The system will send the sub-account's XAI API Key to this email)
- Initial quota
- Click "Create Sub-Account"

4.2 Configure Sub-Account Permissions and Quota
Click "Update Sub-Account" to configure fine-grained controls:
Setting | Description | Example |
---|---|---|
Quota Limit | The maximum amount (in USD) the sub-account can consume. | 100.00 |
Model Whitelist | A list of models the sub-account is allowed to call. | ["gpt-4o-mini", "claude-3-7-sonnet-latest"] |
RPM Limit | Maximum requests per minute. | 60 |
TPM Limit | Maximum tokens per minute. | 100000 |
IP Whitelist | Only allows calls from specified IPs (leave blank for no restriction). | ["203.0.113.0/24"] |

4.3 Sub-Account Login
Sub-accounts log in to m.xaicontrol.com using their own XAI API Key and can only see:
- Their own usage and remaining quota.
- They cannot view or modify the primary account's AI Provider Keys.
5. Why Choose XAI?
Feature | Description |
---|---|
Unified Endpoint | All model calls are routed through a single endpoint, api.xaicontrol.com , with the gateway intelligently routing to the optimal upstream provider. |
Key Rotation | Add multiple upstream keys. The system monitors key health in real-time, automatically rotating, deactivating, and reactivating them to avoid single-point rate limiting. |
Failover | In case of upstream errors (429/5xx), the system performs millisecond-level circuit breaking, automatic retries, and node switching, all transparent to your application. |
Model Mapping | Supports alias mapping (e.g., gpt-3.5-turbo=gpt-4o-mini ), allowing you to upgrade models with zero changes to your existing code. |
Seamless Compatibility | Natively compatible with OpenAI/Anthropic APIs. Simply replace the base_url and api_key . |
Zero-Trust Security | End-to-end encrypted storage with no super-admin access. Data can only be decrypted by the user's private key, eliminating the risk of data leaks. |
Powerful Account Management | Create and manage multi-level sub-accounts for your teams or clients. Set granular controls for each account, including custom rates, quotas, rate limits (RPM/TPM), and model access. |