DEV Community

jt z
jt z

Posted on

How to Use an OpenAI-Compatible API Gateway with Cherry Studio

If you use Cherry Studio to test different AI models, you may eventually run into the same problem:
too many providers, too many API keys, too many base URLs.
One simple way to reduce that friction is to use an OpenAI-compatible API gateway.
In this post, I will show how to connect Cherry Studio to Lanren API, an independent OpenAI-compatible API gateway.
What is Lanren API?
Lanren API is an API gateway that exposes supported model routes through an OpenAI-compatible endpoint.
It can be used with tools that support custom OpenAI-compatible providers.
Supported routes include DeepSeek, Qwen, MiMo, and GPT-compatible models.
The base URL is:
https://lanren.surf/v1
This means tools that already support OpenAI-style APIs can usually connect without major changes.
What you need
Before configuring Cherry Studio, you need:
a Lanren API account
available API credit
an API key generated from the dashboard
Cherry Studio installed
If you do not have credit yet, you can buy an API credit code through Payhip and redeem it in the wallet page.
Website:
https://lanren.surf
Step 1: Create an API key
Log in to Lanren API and open the dashboard.
Go to the API key or token section and create a new key.
Copy the key and keep it private. You will use it in Cherry Studio.
Step 2: Add a custom provider in Cherry Studio
Open Cherry Studio and go to the provider settings.
Choose an option like OpenAI Compatible or Custom OpenAI Provider.
The exact name may be different depending on your Cherry Studio version.
Step 3: Configure the provider
Use the following settings:
Provider type:
OpenAI Compatible
Base URL:
https://lanren.surf/v1
API Key:
your Lanren API key
Model:
choose a model available in your Lanren dashboard
If Cherry Studio asks you to enter the model name manually, copy the exact model ID from Lanren API.
Step 4: Test the setup
Create a new chat in Cherry Studio and select the provider you just added.
Try a simple prompt:
Explain what an API gateway is in one paragraph.
If the setup is correct, Cherry Studio should return a response through the gateway.
Common issues
Missing /v1
Make sure the base URL is:
https://lanren.surf/v1
not just:
https://lanren.surf
Wrong model name
If the model is not found, check the model list in your Lanren dashboard and copy the exact model ID.
Invalid API key
If the request fails immediately, regenerate your API key and update it in Cherry Studio.
Insufficient balance
If your account has no available credit, API calls will fail. Redeem a credit code first.
Why use an API gateway?
An OpenAI-compatible gateway can be useful when you want to:
test multiple models from one endpoint
switch providers without changing your app code
use cheaper models for development and testing
keep a familiar /v1/chat/completions request format
connect tools like Cherry Studio, Chatbox, Open WebUI, or CCSwitch
For small AI projects, this can make experimentation easier and reduce operational overhead.
Important note
Lanren API is not an official OpenAI service.
It is an independent API gateway that provides OpenAI-compatible access to supported model routes.
Also, Lanren API does not provide service for Mainland China users.
Links
Lanren API:
https://lanren.surf
API Base URL:
https://lanren.surf/v1

10:22

添加到对话在侧边聊天中提问

完全访问

5.5超高

Top comments (0)