ChinaWHAPI
Global Gateway
← Back to Knowledge Center
QuickstartOpenAI CompatibleAPI Key

ChinaWHAPI API Quickstart Guide

Call DeepSeek, Qwen, Kimi, GLM, Doubao and other Chinese LLMs through a single OpenAI-compatible interface.

API Endpoint

ChinaWHAPI uses OpenAI-compatible request format, allowing developers to call multiple Chinese mainstream LLMs through a unified gateway. For production, it is recommended to store API Keys in server environment variables rather than in frontend code.

POST https://chinawhapi.com/v1/chat/completions

Minimal Request Example

Replace 'model' with the enabled model name in the console, and replace 'API Key' with your user key.

curl https://chinawhapi.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer {your_api_key}" \
  -d '{"model":"deepseek-v4-flash","messages":[{"role":"user","content":"Hello"}]}'

Getting Your API Key

Log in to the ChinaWHAPI console and generate a new key on the API Keys page. Copy and securely store it; do not hardcode in frontend code.

  • Console URL: https://chinawhapi.com/console
  • Supports multiple key management for easy project isolation
  • Can set key expiration time and permission scope

Common Checks

If a request fails, first verify the key, model name, account balance, and subscription status.

  • 401 usually means invalid API Key
  • 403 usually means insufficient balance or expired plan
  • 400 usually means incorrect request body or model name
  • 429 usually means rate limit triggered