If you are building with Chinese LLMs, the hard part is often not the first API call. It is keeping model names, billing, fallback behavior, and SDK compatibility consistent while testing DeepSeek, Qwen, Kimi, GLM, Doubao and other models.
ChinaWHAPI provides one OpenAI-compatible base URL:
https://chinawhapi.com/v1
Example with the OpenAI SDK:
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.CHINAWHAPI_API_KEY,
baseURL: "https://chinawhapi.com/v1",
});
const response = await client.chat.completions.create({
model: "deepseek-v4-flash",
messages: [{ role: "user", content: "Summarize this in English." }],
max_tokens: 600,
});
console.log(response.choices[0]?.message?.content);
What to test before production:
- model availability and access permissions
- input/output token accounting
- timeout and 429 handling
- fallback behavior for safe retryable requests
- latency and real request cost
Why use a gateway?
A unified gateway lets you keep provider-specific testing while reducing repeated integration work. Instead of building separate SDK wrappers for each Chinese model provider, you can keep the application interface stable and make model choice a configuration decision.
Useful links:
- Docs: https://chinawhapi.com/docs
- Compare Chinese LLMs: https://chinawhapi.com/compare
- Full guide: https://chinawhapi.com/blog/openai-compatible-chinese-llm-api
Top comments (0)