1
Get Your API Key

Sign up and grab your key from the console. No Chinese phone number needed.

1. Go to https://www.tokencnn.com/register
2. Sign up with your email (no China phone needed)
3. Copy your API key from the Console → Token Management
2
Make Your First API Call

Use your API key with any OpenAI-compatible client. Replace sk-xxx with your key.

curl
Python
Node.js
# 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);
3
Switch Models

Just change the model parameter. Popular choices:

deepseek-v4-flash qwen-3-max glm-5 gpt-4o claude-sonnet-4
4
Check Usage & Top Up

View your usage, API keys, and top up your balance in the Console. New users receive free credits.

API Reference

All endpoints are OpenAI-compatible. Base URL: https://www.tokencnn.com/v1

Endpoints

POST /v1/chat/completions Chat completions
GET /v1/models List available models
POST /v1/embeddings Create embeddings
Tips

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.

Useful Links

Ready to build? Get started in minutes.