How to Use DeepSeek API Outside China

# ai# api# llm# tutorial
How to Use DeepSeek API Outside ChinaChinaWHAPI Team

How to Use DeepSeek API Outside China If you're building AI applications with Chinese...

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
Enter fullscreen mode Exit fullscreen mode

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)
Enter fullscreen mode Exit fullscreen mode

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

  1. Sign up at ChinaWHAPI
  2. Get your API key from the dashboard
  3. Install the OpenAI SDK
  4. Update your base_url and 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

How to Use DeepSeek API Outside Chinacommunity discussions on GitHub.*