AI Token API Documentation
OpenAI-compatible API for 11+ Chinese AI models. Base URL: https://eaf9553505eeb8f5-115-190-107-107.serveousercontent.com/v1
Overview
The AI Token API is fully compatible with the OpenAI API specification. You can use any OpenAI SDK or tool by simply changing the base URL. All standard operations are supported: chat completions, streaming, function calling, and more.
Authentication
Include your API key in the Authorization header:
Authorization: Bearer your-api-key
API keys can be obtained from your dashboard after registration.
Available Models
| Model ID | Provider | Context | Input $/M | Output $/M |
|---|---|---|---|---|
deepseek-v4 | DeepSeek | 128K | $0.28 | $0.42 |
deepseek-v3 | DeepSeek | 128K | $0.27 | $0.40 |
deepseek-r1 | DeepSeek | 128K | $0.55 | $2.19 |
deepseek-v4-flash | DeepSeek | 128K | $0.04 | $0.11 |
qwen3.6-flash | Alibaba | 128K | $0.06 | $0.06 |
qwen3-flash | Alibaba | 128K | $0.05 | $0.05 |
qwen-plus | Alibaba | 128K | $0.40 | $1.20 |
qwen-max | Alibaba | 128K | $0.80 | $2.40 |
glm-4-flash | Zhipu AI | 128K | $0.04 | $0.04 |
glm-4-air | Zhipu AI | 128K | $0.10 | $0.10 |
kimi-k3 | Moonshot | 128K | $0.14 | $0.14 |
Chat Completions
POST /v1/chat/completions
{
"model": "deepseek-v4",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello!"}
],
"temperature": 0.7,
"max_tokens": 2048,
"stream": false
}
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Model ID (see models table) |
messages | array | Yes | Array of message objects |
temperature | float | No | 0.0-2.0, default 0.7 |
max_tokens | integer | No | Maximum tokens in response |
stream | boolean | No | Enable streaming response |
top_p | float | No | Nucleus sampling parameter |
Streaming
Set "stream": true to receive Server-Sent Events (SSE):
data: {"id":"chatcmpl-xxx","choices":[{"delta":{"content":"Hello"},"index":0}]}
data: {"id":"chatcmpl-xxx","choices":[{"delta":{"content":" world"},"index":0}]}
data: [DONE]
Error Codes
| Code | Meaning | Resolution |
|---|---|---|
| 401 | Invalid API key | Check your API key |
| 429 | Rate limit exceeded | Wait and retry |
| 500 | Internal server error | Retry or contact support |
| 503 | Model temporarily unavailable | Try a different model |
SDKs & Libraries
Works with any OpenAI-compatible SDK:
- Python:
pip install openai - Node.js:
npm install openai - LangChain:
pip install langchain-openai - LlamaIndex:
pip install llama-index - Cursor IDE: Settings → Models → Add OpenAI Key