Other OpenAI-compatible clients: configure and troubleshoot LYRouter access
Cherry Studio, Chatbox, LobeChat, NextChat, Cline, Continue and other clients that support a custom OpenAI API all connect to LYRouter the same way: add a custom provider of the OpenAI type, set the address to https://api.lyrouter.com/v1 and the key to your LYRouter API key, then add the model IDs you want to use. This page covers the common settings and frequent problems.
Already know how to add a custom provider? Go straight to Configure LYRouter.
Supported clients
You can follow this page for any client that meets either of these conditions:
- It can add a custom provider and choose the OpenAI or OpenAI-compatible type;
- It lets you change the OpenAI API URL (which may also be called Base URL, API Host, API address or endpoint).
Before you start, have two things ready: a LYRouter API key, see Workspaces and API keys; and the model IDs you want to use, copied from the workspace's Model marketplace, see Choosing a model. Tools such as Claude Code and Codex have their own setup guides; see Tools and compatibility.
Configure LYRouter
In the client's provider settings, add a custom provider and fill it in as follows:
| Field | Value |
|---|---|
| Provider type | OpenAI or OpenAI-compatible |
| API URL | https://api.lyrouter.com/v1 |
| API key | Your LYRouter API key (starts with sk-) |
| Models | Add model IDs manually, such as deepseek/deepseek-v4-flash; you can also enter @vmodel/<name> or lyrouter/auto |
- Whether the address includes
/v1: most clients needhttps://api.lyrouter.com/v1. A few clients append/v1to the address themselves; for those, enter only the root addresshttps://api.lyrouter.com. If the field asks for the full request URL, enterhttps://api.lyrouter.com/v1/chat/completions. - Model list: when the client fetches the model list, it calls
GET /v1/models, which returns the models enabled in the workspace this API key belongs to, plus the enabled virtual models andlyrouter/auto. If the client cannot fetch the list, add model IDs manually. Model IDs are case-sensitive, and any slashes in them must be kept exactly as they are. - When the client supports the Anthropic type: if you choose Anthropic as the provider type, set the address to the root address
https://api.lyrouter.com, without/v1.
Verify your first call
In the client, select the model you just added and send a short message such as "Reply with OK". After you get a reply, open the workspace's Log analysis page, find this request by API key, and check that "API Path" is /v1/chat/completions and the status code is 200. Logs are searchable within a few seconds after the call ends.
Clicking only "Check connection" or fetching the model list sends no chat request, and does not prove that chat works.
Everyday use and troubleshooting
I get 404. How should I change the address?
Answer: The address is missing /v1, or the client appended /v1 a second time and the path is duplicated. Try switching between https://api.lyrouter.com/v1 and https://api.lyrouter.com. When the request shows up in the logs, "API Path" should be /v1/chat/completions.
The model I want is not in the model list. What should I do?
Answer: First confirm that the model is enabled in the model marketplace of the workspace this API key belongs to, then add the model ID manually in the client. Models denied by a guardrail model policy do not appear in the list; see Model access.
I get 401. What should I check?
Answer: Make sure you entered a LYRouter API key, not a provider's API key or your console sign-in password, and check that no extra spaces or line breaks came along when you copied it. For what each error message means, see 401 / 403: authentication and access.
Why do I get 403 Model is not available in the model plaza?
Answer: The requested model is not enabled in the workspace this API key belongs to, or the model ID is wrong. Check the spelling and case of the model ID, or ask a workspace Admin to enable the model in the model marketplace; see Unavailable models.
A streamed reply breaks off midway or comes out garbled. What should I do?
Answer: Make sure streaming output is turned on in the client, and check whether a network proxy buffers or cuts off long-lived connections. Once output has started, the gateway no longer switches channels; if a failure happens midway, it appends an error event at the end of the stream; see Timeouts and interrupted streams.
The app gets replies, but I cannot find the request in the LYRouter logs. What should I do?
Answer: Make sure the client is currently using the LYRouter provider you just added, not another provider. Logs are shown per workspace, so search by time and API key in the workspace the API key belongs to; see Troubleshooting with logs.