Disclosure: I work on Ling World Lingshu, the service described in this post.

If your app uses more than one Chinese model family, you normally end up with one account, one key and one bill per vendor. Ling World Lingshu (ai.lingapp.io) puts DeepSeek, GLM, Kimi and MiniMax behind a single endpoint that speaks the OpenAI Chat Completions format. This post shows what you change and what to expect.

1. Change three things: base URL, key, model

from openai import OpenAI client = OpenAI( api_key="sk-YOUR_KEY", base_url="https://ai.lingapp.io/v1", ) stream = client.chat.completions.create( model="flash-std", messages=[{"role": "user", "content": "Explain SSE in two sentences."}], stream=True, stream_options={"include_usage": True}, ) for chunk in stream: if chunk.choices: print(chunk.choices[0].delta.content or "", end="") 

Keep the if chunk.choices check. Because the request sets include_usage, the last chunk carries token usage and has an empty choices list.

2. Switch models by changing one string

Prices are USD per million tokens, as listed on 2 December 2026.

Model Model ID Input Cached input Output
DeepSeek V4.1 Flash flash-std 0.083 0.005 0.34
GLM 5.3 Flash plus-std 0.104 0.0442 0.48
Kimi K3.1 Pro kimi 1.00 0.18 5.00
MiniMax M3.1 Flash minimax-flash 0.10 0.01 0.40

The flash-std and kimi prices are promotional at the time of writing, so check the pricing page before you budget. Each model has a context window of 1 million tokens. GET /v1/models returns the models your key can use.

3. Anthropic format and Claude Code

The same key works with the Anthropic Messages format at /v1/messages. For Claude Code, set two environment variables and choose a model ID such as flash-std:

export ANTHROPIC_BASE_URL=https://ai.lingapp.io export ANTHROPIC_AUTH_TOKEN=sk-YOUR_KEY 

4. What to handle in production

  • A 429 response means you are sending requests too fast. Wait for the number of seconds in the Retry-After header. The chat limit is 40 requests per minute per source IP.
  • A 500, 502 or 503 response is not billed. Retry with exponential backoff.
  • Tool calling and image input follow the OpenAI format. Image input works on the models marked as vision-capable on the models page.
  • Billing is per token from a prepaid balance, with no monthly fee. Cached input is cheaper than fresh input. You top up with USDT or USDC, from $10.
  • Prompts and replies are not logged or stored. Only usage records are kept for billing.

Runnable versions of these snippets are in the examples repository. Full details are in the API docs and the FAQ.