How to Use DeepSeek API Outside China
If you're building AI applications with Chinese large language models (LLMs) like DeepSeek, you've probably encountered the challenge of accessing these APIs from outside China. That's where ChinaWHAPI comes in.
What is ChinaWHAPI?
ChinaWHAPI is an OpenAI-compatible API gateway for Chinese LLMs. It provides unified access to multiple Chinese AI models including:
- DeepSeek (V3, R1)
- Qwen (Alibaba)
- GLM (Zhipu)
- Moonshot (Kimi)
- ERNIE (Baidu)
- Doubao (ByteDance)
- MiniMax
Why Use ChinaWHAPI?
1. No Chinese Phone Number Required
Unlike direct API access from Chinese providers, ChinaWHAPI allows international users to access these models without needing a Chinese phone number for verification.
2. OpenAI-Compatible Format
If you're already using OpenAI's SDK, switching to ChinaWHAPI requires minimal code changes – just update the base_url and api_key.
3. International Payment Support
Accepts international credit cards, making it accessible for developers worldwide.
4. Unified API Interface
Access multiple Chinese LLMs through a single API endpoint, simplifying your integration workflow.
Quick Start Guide
Installation
pip install openai
Basic Usage
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": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello!"}
]
)
print(response.choices[0].message.content)
Available Models
| Model | Provider | Use Case |
|---|---|---|
| deepseek-chat | DeepSeek | General conversation |
| deepseek-coder | DeepSeek | Code generation |
| qwen-plus | Alibaba | Advanced reasoning |
| glm-4 | Zhipu | Multi-modal tasks |
| moonshot-v1 | Moonshot | Long context understanding |
Comparison with Direct API Access
| Feature | Direct API | ChinaWHAPI |
|---|---|---|
| Phone Verification | Required (Chinese) | Not required |
| Payment | Local methods only | International cards |
| API Format | Varies by provider | OpenAI-compatible |
| Documentation | Chinese | English + Chinese |
| Support | Business hours (CST) | 24/7 |
Pricing
ChinaWHAPI offers competitive pricing with pay-as-you-go model:
- DeepSeek V3: $0.27 / 1M tokens (input), $1.10 / 1M tokens (output)
- Qwen Plus: $0.50 / 1M tokens (input), $1.50 / 1M tokens (output)
- GLM-4: $0.70 / 1M tokens (input), $2.80 / 1M tokens (output)
Prices may vary, check official website for latest rates.
Use Cases
ChinaWHAPI is ideal for:
- AI Agents: Build autonomous agents with Chinese LLM capabilities
- Chatbots: Create multilingual customer support bots
- SaaS Applications: Integrate Chinese AI models into your products
- Research: Experiment with different Chinese LLM architectures
- Content Creation: Generate Chinese content for global audiences
Getting Started
- Sign up at ChinaWHAPI
- Get your API key from the dashboard
- Install the OpenAI SDK
- Update your
base_urland start coding!
Conclusion
ChinaWHAPI bridges the gap between international developers and powerful Chinese LLMs. With its OpenAI-compatible interface, no phone verification requirement, and support for multiple models, it's the easiest way to leverage Chinese AI capabilities in your projects.
Whether you're building AI agents, chatbots, or any application that needs Chinese language understanding, ChinaWHAPI provides the infrastructure you need to get started quickly.
*Have questions? Check out the documentation or join our
Top comments (0)