<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: TokenHub</title>
    <description>The latest articles on DEV Community by TokenHub (@tokenhub).</description>
    <link>https://dev.to/tokenhub</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3963777%2Fde9c620a-3725-49be-8260-b197022ffcb0.png</url>
      <title>DEV Community: TokenHub</title>
      <link>https://dev.to/tokenhub</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tokenhub"/>
    <language>en</language>
    <item>
      <title>How I built an OpenAI-compatible API relay for Chinese AI models</title>
      <dc:creator>TokenHub</dc:creator>
      <pubDate>Tue, 02 Jun 2026 05:33:05 +0000</pubDate>
      <link>https://dev.to/tokenhub/how-i-built-an-openai-compatible-api-relay-for-chinese-ai-models-4mmp</link>
      <guid>https://dev.to/tokenhub/how-i-built-an-openai-compatible-api-relay-for-chinese-ai-models-4mmp</guid>
      <description>&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;So I built a relay service that makes these models accessible through a standard OpenAI-compatible API.&lt;/p&gt;

&lt;p&gt;The stack:&lt;/p&gt;

&lt;p&gt;One API (open source) — routing, auth, quota, model mapping&lt;br&gt;
Nginx — reverse proxy with rate limiting and auth gate&lt;br&gt;
4 upstream channels — Aliyun, Zhipu, MiniMax, Qiniu&lt;br&gt;
50+ models behind one endpoint&lt;br&gt;
How to use:&lt;/p&gt;

&lt;p&gt;from openai import OpenAI&lt;br&gt;
client = OpenAI(&lt;br&gt;
    base_url="&lt;a href="https://t-hub.cc/v1" rel="noopener noreferrer"&gt;https://t-hub.cc/v1&lt;/a&gt;",&lt;br&gt;
    api_key="your_token"&lt;br&gt;
)&lt;br&gt;
response = client.chat.completions.create(&lt;br&gt;
    model="deepseek-v3",&lt;br&gt;
    messages=[{"role":"user","content":"Hello!"}]&lt;br&gt;
)&lt;br&gt;
Available models:&lt;/p&gt;

&lt;p&gt;.DeepSeek V3 ($0.2/M tokens)&lt;br&gt;
.DeepSeek V4 Pro ($0.3/M)&lt;br&gt;
.DeepSeek R1 ($2/M)&lt;br&gt;
.Qwen 3.7 Max ($1.6/M)&lt;br&gt;
.GLM-5.1 ($2/M)&lt;br&gt;
.GLM-4 Flash (FREE)&lt;br&gt;
.Kimi K2.6 ($1.4/M)&lt;br&gt;
.40+ more&lt;br&gt;
Why I built this:&lt;br&gt;
The Chinese AI ecosystem has incredible models at low prices (DeepSeek V3 is 75x cheaper than GPT-4o), but they're locked behind phone verification. This relay breaks down that barrier.&lt;/p&gt;

&lt;p&gt;Happy to answer questions about the architecture or implementation.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>api</category>
      <category>deepseek</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
