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

π»π‘œπ‘™π‘œπ‘”π‘Ÿπ‘Žπ‘β„Žπ‘–π‘ Β· 𝑆𝑒𝑏-π‘–π‘›π‘“π‘œπ‘Ÿπ‘šπ‘Žπ‘‘π‘–π‘œπ‘› πΆπ‘œπ‘›π‘π‘’π‘π‘‘ 𝐷𝑒𝑠𝑖𝑔𝑛

Β© 2022-2025 xaixapi.com

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

Today's real-time usage statistics

You can query data within 1 year

Total Cost

\$0.00

Total Requests

0

Input Tokens

0

Output Tokens

0

Images

0

Model Usage Details

Model Requests Input Tokens Output Tokens Images Cost Percentage

Daily Usage Statistics

Date Requests Cost Tokens Images Primary Model

Account Balance Query

Supported format: XAI XAPI Keys starting with sk-Xvs...

Query Results

XAI Model List

Please visit to view all supported models

🌐 Supported AI Service Providers

OpenAI

platform.openai.com/docs

Anthropic

docs.anthropic.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 all models from the above AI service providers. With a single API key, you can seamlessly access AI models from any of these providers, enabling flexible and efficient AI application development.

πŸ’» SDK 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-20250514",
    max_tokens=128,
    system="You are AI.",
    messages=[
	{
	    "role": "user",
	    "content": "What is the meaning of life, the universe, and everything?",
	},
    ],
)
print(message.content)

πŸ“š More Information

Please read the documentation at

Create New Sub-account

Username must be unique and cannot duplicate existing accounts
Email address must be unique and cannot duplicate existing accounts

API Call Examples

cURL

Python

JavaScript

Fund/Deduct Sub-account

Support query by username or user ID

API Call Examples

cURL

Python

JavaScript

View Sub-account Information

Leave empty to display all sub-account information

API Call Examples

cURL

Python

JavaScript

Update Sub-account Information

Enter the username or user ID of the sub-account to update

Basic Information

Quota Settings

Rate Limits

Access Control

API Call Examples

cURL

Python

JavaScript

Delete Sub-account

This action cannot be undone. The sub-account Key will be immediately invalidated.

Please carefully confirm the sub-account identifier to delete

API Call Examples

cURL

Python

JavaScript

Activity Logs

Time Operator Action Target Account Details IP Address

Loading logs...

No activity logs available

Operation Result



					

πŸ”‘ Secret Key

Please keep this key secure, it will be used for sub-account API authentication

πŸ’‘ Tip: Please notify the sub-account owner to check their email for the API key