Sign up and grab your key from the console. No Chinese phone number needed.
2. Sign up with your email (no China phone needed)
3. Copy your API key from the Console → Token Management
Use your API key with any OpenAI-compatible client. Replace sk-xxx with your key.
# Replace sk-xxx with your actual API key
curl https://www.tokencnn.com/v1/chat/completions \
-H "Authorization: Bearer sk-xxx" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-v4-flash",
"messages": [{"role": "user", "content": "Hello!"}],
"stream": false
}'
# pip install openai from openai import OpenAI client = OpenAI( base_url="https://www.tokencnn.com/v1", api_key="sk-xxx" # Replace with your key ) response = client.chat.completions.create( model="deepseek-v4-flash", messages=[{"role": "user", "content": "Hello!"}] ) print(response.choices[0].message.content)
// npm install openai import OpenAI from 'openai'; const client = new OpenAI({ baseURL: 'https://www.tokencnn.com/v1', apiKey: 'sk-xxx' // Replace with your key }); const response = await client.chat.completions.create({ model: 'deepseek-v4-flash', messages: [{role: 'user', content: 'Hello!'}] }); console.log(response.choices[0].message.content);
Just change the model parameter. Popular choices:
View your usage, API keys, and top up your balance in the Console. New users receive free credits.
All endpoints are OpenAI-compatible. Base URL: https://www.tokencnn.com/v1
Endpoints
Common patterns and gotchas
Streaming
Add "stream": true to your request body for real-time token-by-token responses.
Max Tokens
Control response length with "max_tokens": 2048. Default varies by model.
Error 401
Invalid or missing API key. Check Authorization: Bearer sk-xxx header format.
Error 429
Rate limited. Wait and retry. Paid users get higher rate limits.
Error 500
Server error. Retry with exponential backoff. Usually transient.
Temperature
Adjust "temperature": 0.7 (0-2) for more creative or deterministic output.
Ready to build? Get started in minutes.
Sign Up Free