Developer documentation
Build your first request
Reach DeepSeek, Qwen, GLM, Kimi, Doubao and more through one OpenAI-compatible gateway. Use Console Quickstart when you want a personalised, testable setup.
/
Nothing matches that. Try a protocol, a capability or an endpoint path.
Base URL
https://api.chinaapi.ai/v1One address for every protocol below. Point your SDK at it and keep the rest of your code.
Authentication
Authorization: Bearer $CHINAAPI_KEYBearer token. These pages only ever show the $CHINAAPI_KEY placeholder — create the real key in the console and keep it out of your source.
Where model IDs come from
deepseek-chatModel IDs are the ones published in the catalogue. Copy the exact string from the Models page; never guess it from a vendor's own naming.
curl
curl https://api.chinaapi.ai/v1/chat/completions \
-H "Authorization: Bearer $CHINAAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-chat",
"messages": [{ "role": "user", "content": "Hello" }]
}'
Python
from openai import OpenAI
client = OpenAI(
api_key=os.environ["CHINAAPI_KEY"],
base_url="https://api.chinaapi.ai/v1",
)
result = client.chat.completions.create(
model="deepseek-chat",
messages=[{"role": "user", "content": "Hello"}],
)
TypeScript
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.CHINAAPI_KEY,
baseURL: "https://api.chinaapi.ai/v1",
});
const result = await client.chat.completions.create({
model: "deepseek-chat",
messages: [{ role: "user", content: "Hello" }],
});