TokenChuhai|API Docs
Get API Key

API Documentation

TokenChuhai provides an OpenAI-compatible API for DeepSeek models. Drop-in replacement — just change base_url.

Quick Start

  1. 1Get your API key — enter your email, copy the key
  2. 2Set base_url to https://tokenchuhai.chat/api/v1
  3. 3Use the OpenAI SDK or any HTTP client — it just works

Code Examples

Chat Completionpython
from openai import OpenAI

client = OpenAI(
    api_key="tch_YOUR_API_KEY",
    base_url="https://tokenchuhai.chat/api/v1"
)

response = client.chat.completions.create(
    model="deepseek-v4-pro",
    messages=[
        {"role": "user", "content": "Explain quantum computing"}
    ]
)

print(response.choices[0].message.content)
cURLbash
curl https://tokenchuhai.chat/api/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer tch_YOUR_API_KEY" \
  -d '{
    "model": "deepseek-v4-pro",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'
Node.jsjavascript
import OpenAI from 'openai';

const client = new OpenAI({
  apiKey: 'tch_YOUR_API_KEY',
  baseURL: 'https://tokenchuhai.chat/api/v1',
});

const response = await client.chat.completions.create({
  model: 'deepseek-v4-flash',
  messages: [{ role: 'user', content: 'Hello!' }],
});

console.log(response.choices[0].message.content);

API Endpoints

MethodEndpointDescription
POST/api/v1/chat/completionsChat completions (OpenAI compatible)
GET/api/v1/modelsList available models and pricing

Models & Pricing

Pay-as-you-go. No subscriptions. Per 1 million tokens.

ModelInputOutputContextBest For
deepseek-v4-pro$0.50$2.00128KBest for coding, reasoning, general purpose
deepseek-v4-flash$0.15$0.60128KFast responses, simple tasks, high throughput

Compare: GPT-4o is $2.50/$10.00 per 1M tokens. DeepSeek V4 Pro delivers same quality at 80% less.

Authentication

Include your API key in the Authorization header:

Authorization: Bearer tch_YOUR_API_KEY

Keys start with tch_. Get yours on the homepage.

SDK Compatibility

Any OpenAI-compatible SDK works. Just change the base URL:

OpenAI Python
OpenAI Node.js
LangChain
LlamaIndex
Vercel AI SDK
OpenAI Java
OpenAI Go
Semantic Kernel

Error Codes

CodeMessageFix
401Invalid API keyCheck your key is correct and active
429Token quota exceededTop up in Dashboard → Top Up
400Invalid request / unknown modelCheck model name. Visit /api/v1/models for options