DEV Community

tunan666
tunan666

Posted on

How to Access DeepSeek V4, Qwen 3.7, and GLM-4 from Outside China (No VPN Needed)

Chinese LLMs have gotten incredibly good — and they just topped global rankings again. DeepSeek V4, Qwen 3.7, and GLM-4 compete with or beat GPT on many benchmarks, and they're a fraction of the cost.

But if you're outside China, actually using their APIs is a pain:

  • 📵 Need a Chinese phone number for registration
  • 🪪 ID verification (Chinese national ID or passport)
  • 🔀 Separate accounts, API keys, and billing for each provider
  • 💳 Payment requires Chinese payment methods (Alipay/WeChat Pay)

That's a lot of friction just to try a model. Let me show you a simpler way.

TunanAPI: One Endpoint for All Chinese LLMs

TunanAPI is a unified OpenAI-compatible API that lets you access the best Chinese models from anywhere in the world. One API key, one endpoint, PayPal billing.

Quick Start (3 steps)

Step 1: Get your API key

Visit tunanapi.com, sign up with your email, and top up with PayPal. You'll get an API key instantly — no Chinese phone number or ID required.

Step 2: Install the OpenAI SDK

pip install openai
Enter fullscreen mode Exit fullscreen mode

Step 3: Make your first request

from openai import OpenAI

client = OpenAI(
    api_key="sk-your-api-key",
    base_url="https://api.tunanapi.com/v1"
)

# Try DeepSeek V4 Flash — fast and affordable
response = client.chat.completions.create(
    model="deepseek-chat",
    messages=[
        {"role": "user", "content": "Explain quantum computing in simple terms"}
    ],
    stream=True
)

for chunk in response:
    if chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="")
Enter fullscreen mode Exit fullscreen mode

That's it. If you've used the OpenAI API before, you already know how to use this.

Available Models & Pricing

Model Best For Input/1M tokens Output/1M tokens
GLM-4-Flash Free-tier tasks $0.05 $0.05
Qwen3.5-Flash Ultra-cheap production $0.35 $1.39
DeepSeek V4 Flash Fast, affordable tasks $0.70 $1.40
MiniMax M3 Coding & reasoning $1.20 $4.80
GLM-4-Plus Chinese + English $1.39 $1.39
Qwen3.7-Plus Balanced performance $1.39 $5.56
Qwen3.7-Max General purpose, 1M context $2.08 $6.25
DeepSeek V4 Pro Complex reasoning $2.18 $4.35

Compare to Anthropic's newly announced Fable 5 at $10/$50 — our Qwen3.7-Max at $2.08/$6.25 is 8x cheaper for similar flagship-tier performance.

Streaming Example (Node.js)

import OpenAI from 'openai';

const client = new OpenAI({
  apiKey: 'sk-your-api-key',
  baseURL: 'https://api.tunanapi.com/v1'
});

const stream = await client.chat.completions.create({
  model: 'qwen3.7-plus',
  messages: [{ role: 'user', content: 'Write a haiku about programming' }],
  stream: true,
});

for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content || '');
}
Enter fullscreen mode Exit fullscreen mode

Works With Your Favorite Frameworks

LangChain:

from langchain_openai import ChatOpenAI

llm = ChatOpenAI(
    base_url="https://api.tunanapi.com/v1",
    api_key="your-key",
    model="deepseek-chat"
)
Enter fullscreen mode Exit fullscreen mode

Vercel AI SDK:

import { createOpenAI } from '@ai-sdk/openai';

const tunan = createOpenAI({
  baseURL: 'https://api.tunanapi.com/v1',
  apiKey: 'your-key',
});
Enter fullscreen mode Exit fullscreen mode

cURL:

curl https://api.tunanapi.com/v1/chat/completions \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"model":"deepseek-chat","messages":[{"role":"user","content":"Hello!"}]}'
Enter fullscreen mode Exit fullscreen mode

Why Not Just Use the Official APIs?

You absolutely can — if you're willing to:

  1. Get a Chinese phone number (or use a VPN + SMS service)
  2. Complete identity verification with a passport scan
  3. Set up separate accounts for each provider
  4. Figure out payment (Alipay/WeChat Pay only for some)
  5. Manage multiple API keys and endpoints

If that sounds like too much work for your use case, TunanAPI handles all of that for you. You just write code.

More Resources


Questions? Drop a comment or reach out. Happy building! 🚀

Top comments (0)