DEV Community

ChinaWHAPI Team
ChinaWHAPI Team

Posted on

llm

Many developers outside China want to test DeepSeek, but setup can be difficult due to different APIs, Chinese documentation and access issues.

ChinaWH API makes it easier by providing an OpenAI-compatible endpoint for Chinese LLMs including DeepSeek, Qwen and GLM.

Why Global Developers Need Chinese LLM API

Chinese large language models like DeepSeek, Qwen, and GLM have become powerful options for AI applications, especially for:

  • Chinese language tasks (writing, translation, customer support)
  • Cost-sensitive AI workflows
  • AI agents requiring strong reasoning capabilities
  • Chatbots serving Chinese-speaking users

However, accessing these models from outside China can be challenging:

  • Different API formats across providers
  • Chinese-only documentation
  • Complex authentication flows
  • Inconsistent integration patterns

The Solution: OpenAI-Compatible API Gateway

If your application already supports OpenAI-compatible APIs, you can access Chinese LLMs with minimal code changes. The key is using an OpenAI-compatible gateway that maintains the /v1/chat/completions format.

Introducing ChinaWH API

ChinaWH API provides a unified, OpenAI-compatible API gateway for Chinese LLMs. With one API key, you can access:

  • DeepSeek - Strong reasoning and coding capabilities
  • Qwen (Alibaba) - Excellent Chinese language understanding
  • GLM (Zhipu) - Balanced performance across tasks
  • Moonshot - Long context support
  • ERNIE (Baidu) - Enterprise-grade Chinese NLP
  • Doubao (ByteDance) - Consumer-focused AI
  • MiniMax - Multimodal capabilities

Quick Start Guide

Step 1: Get Your API Key

Sign up at ChinaWH API to get your free API key.

Step 2: Change Your Base URL

Instead of https://api.openai.com/v1, use:

https://api.chinawhapi.com/v1
Enter fullscreen mode Exit fullscreen mode

Step 3: Update Model Name

Replace gpt-3.5-turbo with the Chinese model you want to use:

  • deepseek-chat for DeepSeek
  • qwen-plus for Qwen
  • glm-4 for GLM
  • And more...

Code Examples

Python Example

from openai import OpenAI

client = OpenAI(
    api_key="your_chinawhapi_key",
    base_url="https://api.chinawhapi.com/v1"
)

response = client.chat.completions.create(
    model="deepseek-chat",
    messages=[
        {"role": "user", "content": "Hello, how are you?"}
    ]
)

print(response.choices[0].message.content)
Enter fullscreen mode Exit fullscreen mode

Node.js Example

const { OpenAI } = require('openai');

const client = new OpenAI({
  apiKey: 'your_chinawhapi_key',
  baseURL: 'https://api.chinawhapi.com/v1'
});

const response = await client.chat.completions.create({
  model: 'deepseek-chat',
  messages: [{ role: 'user', content: 'Hello, how are you?' }]
});

console.log(response.choices[0].message.content);
Enter fullscreen mode Exit fullscreen mode

cURL Example

Top comments (0)