<?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: jt z</title>
    <description>The latest articles on DEV Community by jt z (@jt_z_9ad7c89300cce3a2cbba).</description>
    <link>https://dev.to/jt_z_9ad7c89300cce3a2cbba</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4006058%2F77b19488-d8d0-4860-8cdd-e8c28c42d43e.png</url>
      <title>DEV Community: jt z</title>
      <link>https://dev.to/jt_z_9ad7c89300cce3a2cbba</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jt_z_9ad7c89300cce3a2cbba"/>
    <language>en</language>
    <item>
      <title>How to Use an OpenAI-Compatible API Gateway with Cherry Studio</title>
      <dc:creator>jt z</dc:creator>
      <pubDate>Tue, 30 Jun 2026 02:23:23 +0000</pubDate>
      <link>https://dev.to/jt_z_9ad7c89300cce3a2cbba/how-to-use-an-openai-compatible-api-gateway-with-cherry-studio-5h9p</link>
      <guid>https://dev.to/jt_z_9ad7c89300cce3a2cbba/how-to-use-an-openai-compatible-api-gateway-with-cherry-studio-5h9p</guid>
      <description>&lt;p&gt;If you use Cherry Studio to test different AI models, you may eventually run into the same problem:&lt;br&gt;
too many providers, too many API keys, too many base URLs.&lt;br&gt;
One simple way to reduce that friction is to use an OpenAI-compatible API gateway.&lt;br&gt;
In this post, I will show how to connect Cherry Studio to Lanren API, an independent OpenAI-compatible API gateway.&lt;br&gt;
What is Lanren API?&lt;br&gt;
Lanren API is an API gateway that exposes supported model routes through an OpenAI-compatible endpoint.&lt;br&gt;
It can be used with tools that support custom OpenAI-compatible providers.&lt;br&gt;
Supported routes include DeepSeek, Qwen, MiMo, and GPT-compatible models.&lt;br&gt;
The base URL is:&lt;br&gt;
&lt;a href="https://lanren.surf/v1" rel="noopener noreferrer"&gt;https://lanren.surf/v1&lt;/a&gt;&lt;br&gt;
This means tools that already support OpenAI-style APIs can usually connect without major changes.&lt;br&gt;
What you need&lt;br&gt;
Before configuring Cherry Studio, you need:&lt;br&gt;
a Lanren API account&lt;br&gt;
available API credit&lt;br&gt;
an API key generated from the dashboard&lt;br&gt;
Cherry Studio installed&lt;br&gt;
If you do not have credit yet, you can buy an API credit code through Payhip and redeem it in the wallet page.&lt;br&gt;
Website:&lt;br&gt;
&lt;a href="https://lanren.surf" rel="noopener noreferrer"&gt;https://lanren.surf&lt;/a&gt;&lt;br&gt;
Step 1: Create an API key&lt;br&gt;
Log in to Lanren API and open the dashboard.&lt;br&gt;
Go to the API key or token section and create a new key.&lt;br&gt;
Copy the key and keep it private. You will use it in Cherry Studio.&lt;br&gt;
Step 2: Add a custom provider in Cherry Studio&lt;br&gt;
Open Cherry Studio and go to the provider settings.&lt;br&gt;
Choose an option like OpenAI Compatible or Custom OpenAI Provider.&lt;br&gt;
The exact name may be different depending on your Cherry Studio version.&lt;br&gt;
Step 3: Configure the provider&lt;br&gt;
Use the following settings:&lt;br&gt;
Provider type:&lt;br&gt;
OpenAI Compatible&lt;br&gt;
Base URL:&lt;br&gt;
&lt;a href="https://lanren.surf/v1" rel="noopener noreferrer"&gt;https://lanren.surf/v1&lt;/a&gt;&lt;br&gt;
API Key:&lt;br&gt;
your Lanren API key&lt;br&gt;
Model:&lt;br&gt;
choose a model available in your Lanren dashboard&lt;br&gt;
If Cherry Studio asks you to enter the model name manually, copy the exact model ID from Lanren API.&lt;br&gt;
Step 4: Test the setup&lt;br&gt;
Create a new chat in Cherry Studio and select the provider you just added.&lt;br&gt;
Try a simple prompt:&lt;br&gt;
Explain what an API gateway is in one paragraph.&lt;br&gt;
If the setup is correct, Cherry Studio should return a response through the gateway.&lt;br&gt;
Common issues&lt;br&gt;
Missing /v1&lt;br&gt;
Make sure the base URL is:&lt;br&gt;
&lt;a href="https://lanren.surf/v1" rel="noopener noreferrer"&gt;https://lanren.surf/v1&lt;/a&gt;&lt;br&gt;
not just:&lt;br&gt;
&lt;a href="https://lanren.surf" rel="noopener noreferrer"&gt;https://lanren.surf&lt;/a&gt;&lt;br&gt;
Wrong model name&lt;br&gt;
If the model is not found, check the model list in your Lanren dashboard and copy the exact model ID.&lt;br&gt;
Invalid API key&lt;br&gt;
If the request fails immediately, regenerate your API key and update it in Cherry Studio.&lt;br&gt;
Insufficient balance&lt;br&gt;
If your account has no available credit, API calls will fail. Redeem a credit code first.&lt;br&gt;
Why use an API gateway?&lt;br&gt;
An OpenAI-compatible gateway can be useful when you want to:&lt;br&gt;
test multiple models from one endpoint&lt;br&gt;
switch providers without changing your app code&lt;br&gt;
use cheaper models for development and testing&lt;br&gt;
keep a familiar /v1/chat/completions request format&lt;br&gt;
connect tools like Cherry Studio, Chatbox, Open WebUI, or CCSwitch&lt;br&gt;
For small AI projects, this can make experimentation easier and reduce operational overhead.&lt;br&gt;
Important note&lt;br&gt;
Lanren API is not an official OpenAI service.&lt;br&gt;
It is an independent API gateway that provides OpenAI-compatible access to supported model routes.&lt;br&gt;
Also, Lanren API does not provide service for Mainland China users.&lt;br&gt;
Links&lt;br&gt;
Lanren API:&lt;br&gt;
&lt;a href="https://lanren.surf" rel="noopener noreferrer"&gt;https://lanren.surf&lt;/a&gt;&lt;br&gt;
API Base URL:&lt;br&gt;
&lt;a href="https://lanren.surf/v1" rel="noopener noreferrer"&gt;https://lanren.surf/v1&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;10:22&lt;/p&gt;

&lt;p&gt;添加到对话在侧边聊天中提问&lt;/p&gt;

&lt;p&gt;完全访问&lt;/p&gt;

&lt;p&gt;5.5超高&lt;/p&gt;

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