Menu

Post image 1
Post image 2
1 / 2
0

How I built an OpenAI-compatible API relay for Chinese AI models

DEV Community: tutorial·TokenHub·about 5 hours ago
#fszYW6vM
#dev#deepseek#models#openai#chinese#phone
Reading 0:00
15s threshold

I wanted to use DeepSeek V3's API but found out you need a Chinese phone number (+86) and Alipay. Same problem with Qwen, GLM, Kimi — basically all top Chinese LLMs. So I built a relay service that makes these models accessible through a standard OpenAI-compatible API. The stack: One API (open source) — routing, auth, quota, model mapping Nginx — reverse proxy with rate limiting and auth gate 4 upstream channels — Aliyun, Zhipu, MiniMax, Qiniu 50+ models behind one endpoint How to use: from openai import OpenAI client = OpenAI( base_url=" https://t-hub.cc/v1 ", api_key="your_token" ) response = client.chat.completions.create( model="deepseek-v3", messages=[{"role":"user","content":"Hello!"}] ) Available models: .DeepSeek V3 ($0.2/M tokens) .DeepSeek V4 Pro ($0.3/M) .DeepSeek R1 ($2/M) .Qwen 3.7 Max ($1.6/M) .GLM-5.1 ($2/M) .GLM-4 Flash (FREE) .Kimi K2.6 ($1.4/M) .40+ more Why I built this: The Chinese AI ecosystem has incredible models at low prices (DeepSeek V3 is 75x cheaper than GPT-4o), but they're…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More