Cherry Studio API URL Rules: Trailing / and #, Fixing Failed Checks

Blog / Developer tools

Cherry Studio API URL Rules: Trailing / and #, Fixing Failed Checks

In Cherry Studio, the API URL field usually takes just the root address, meaning the domain or everything before the version segment. The app appends /v1/chat/completions itself. If your provider's path is not /v1, end the URL with / and the app appends only chat/completions. If you want to use a complete URL exactly as written, end it with #. The most common cherry studio api url mistake is a duplicated or missing /v1 segment, which makes the "Check" button return a 404.

What URL does Cherry Studio build from what you enter?

When you add a custom provider under Settings → Model Services and choose the OpenAI (OpenAI-compatible) type, a preview line appears under the API URL field. That preview is the address the app will actually request. The joining rules are described in Cherry Studio's official documentation and boil down to three cases:

How your URL endsWhat the app doesActual request
Plain ending (no / or #)Appends /v1/chat/completions{what you entered}/v1/chat/completions
Ends with /Skips v1, appends only chat/completions{what you entered}chat/completions
Ends with #Strips the # and uses the URL as is{what you entered, without #}

These three rules only decide the chat completions path. For other endpoints such as fetching the model list or embeddings, the app builds the matching path from the same prefix. Details can differ between versions, so trust the preview under the input box rather than a tutorial screenshot.

If you pick Anthropic, Gemini or another provider format, the appended path is different too, and again the preview is the source of truth. All tables in this article assume the OpenAI-compatible format.

How should you fill in the URL for providers with different paths?

Suppose the provider's docs give the full chat URL shown on the left. The right column is what to enter in Cherry Studio. All domains are examples.

Full URL in the provider's docsEnter in Cherry StudioNotes
https://api.example.com/v1/chat/completionshttps://api.example.comThe most common case; the app adds /v1/...
https://api.example.com/v2/chat/completionshttps://api.example.com/v2/The trailing / makes the app skip v1
https://api.example.com/api/v3/chat/completionshttps://api.example.com/api/v3/Same idea, with an extra path level
https://api.example.com/openai/v1/chat/completionshttps://api.example.com/openai or https://api.example.com/openai/v1/Both forms give the same preview
https://api.example.com/custom/chathttps://api.example.com/custom/chat#If the path doesn't end in chat/completions, # is the only option

A few easy ways to get it wrong:

What you enterResulting previewProblem
https://api.example.com/v1.../v1/v1/chat/completionsExtra v1, usually a 404
https://api.example.com/v1/chat/completions.../v1/chat/completions/v1/chat/completionsEntered the full URL as if it were the root
https://api.example.com/v2.../v2/v1/chat/completionsForgot the trailing / on a non-v1 path
https://api.example.com/v1/chat/completions/.../v1/chat/completions/chat/completionsA trailing / only drops v1; the second half is still duplicated

There is only one test: compare the full URL in the provider's docs with Cherry Studio's preview, and they must match character for character. Other tools treat /v1 differently. For example, the OpenAI Compatible mode in Cline and Roo Code expects you to write /v1 into the Base URL yourself; see Base URL and /v1 in Cline / Roo Code. For Claude Code, Codex and OpenCode, see Custom API endpoints for Claude Code, Codex and OpenCode. It is normal for the same provider to need different URL formats in different tools.

Adding a custom provider: step by step

  1. Open Settings → Model Services, click "Add" at the bottom, enter a name, and set the provider type to OpenAI.
  2. Paste your key into "API Key". Make sure there are no leading or trailing spaces or line breaks; these are easy to pick up when copying from a web page.
  3. Fill in "API URL" using the tables above, then check the preview under the input box and compare it character for character with the full URL in the provider's docs.
  4. Click "Manage" or "Add" to add models. If the model list can be fetched automatically, tick the ones you want. If not, add them by hand, and the model ID must match the provider's docs exactly, including case and prefix.
  5. Click "Check" next to the API key, pick a model you just added, and wait for the result.
  6. Turn on the provider switch, go back to the chat page, switch to this provider's model in the model selector at the top, and send a short message to confirm.

If step 5 fails, don't change the URL yet. Use the next section to work out which kind of error you have.

What do the different "Check" failures mean?

"Check" simply sends one real request using your URL, key and model, so the errors match what you would see calling the API directly. By HTTP status and message text, they fall into four groups:

ErrorMost likely causeWhat to check first
401 / Unauthorized / invalid api keyKeyWhether the key was copied completely, with no spaces; whether it belongs to this provider; whether it was deleted or disabled
404 / Not FoundURL pathWhether v1 is duplicated or missing in the preview; whether the trailing / or # is used correctly
model not found / 400Model IDSpelling of the model ID; whether the model is available on your account or plan
Timeout / Network Error / Failed to fetchNetwork or serverWhether your network can reach the domain; whether the provider is currently having an outage

Two other messages are common as well. A 402 or an insufficient-balance message means the request reached the provider and the problem is your account balance. A 429 is rate limiting; wait a bit and test again. For the full list of status codes, see LLM API error codes cheat sheet.

A note on order: a 401 or model not found usually means the URL is correct, because the request reached the provider and was recognized. Only a 404 means you should go back and change the URL. If you edit the URL as soon as you see any error, you can break an address that was already right.

URL and key are right but it still times out. Is it the network?

Timeout errors are different from the first three kinds, because the request may never have reached the provider. Work through these steps in order.

Step 1: check whether the provider is having an outage. Open cdnping's API status page, find the provider and look at the latest edge probe results (some providers also mirror events from their official status pages). For a popular AI service you can also check Is it down? to see whether other users reported it as unreachable or slow at the same time.

Step 2: test the connection from your own network. The status page data comes from Cloudflare edge nodes and does not represent your home or office network. On the cdnping home page speed test, your browser connects directly to 15 AI model APIs and reports "first connect" (including DNS and TLS handshake) and "round trip" (the median of 3 requests after the connection is reused) separately. If first connect is slow or fails while round trip is normal, the problem is usually DNS or the handshake. If both are high, the route itself is probably a long detour. The difference between the two metrics is explained in AI API latency breakdown, and for background on latency to each provider from mainland China, see /en/learn/ai-api-latency-china.

Step 3: bypass Cherry Studio and call the API with curl. Copy the preview address as is:

curl -sS -o /dev/null -w "HTTP %{http_code}  connect %{time_connect}s  tls %{time_appconnect}s  total %{time_total}s\n" \
  https://api.example.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"your-model-id","messages":[{"role":"user","content":"hi"}],"max_tokens":8}'
  • curl returns 200 but Cherry Studio times out: check Cherry Studio's proxy settings (the network proxy mode in Settings) and whether the system proxy and the app proxy agree.
  • curl also times out and connect time is very long: the problem is at the network layer and has nothing to do with Cherry Studio. To tell timeouts, refused connections and connection resets apart, see Connection refused vs. timed out vs. reset.
  • curl returns 401, 404 or similar: go back to the previous section's table.

Edge probe data: round-trip times for each API entry point

Below are cdnping's probe results from the Cloudflare Denver (DEN) edge node to several official API entry points, taken on October 17, 2026 between 08:40 and 10:05 UTC, with 242 probes in that window. cdnping only started collecting on 2026-10-17, so the window is short. Treat it as a reference only; it also does not reflect performance from networks in mainland China.

API entry pointMedian round trip (ms)Round trip P95 (ms)
api.openai.com96194
api.anthropic.com7384
api.deepseek.com353414
open.bigmodel.cn (Zhipu)395674
api.moonshot.cn (Kimi, Moonshot AI)3751125
dashscope.aliyuncs.com (Alibaba Cloud Model Studio)6151152
ark.cn-beijing.volces.com (Volcengine Ark)4851149
api.siliconflow.cn (SiliconFlow)6311030

From a single probe point, round trips to different providers can differ by several times, and entry points hosted inside China are naturally slower when measured from a US node. For a timeout in Cherry Studio, rely on a speed test from your own network rather than this table. The data methodology is described at /en/methodology.

Using an aggregation gateway: how to map the URL

If you use an OpenAI-compatible aggregation gateway, the rules are the same: find the full chat URL in the gateway's docs, work backwards to the root address with the tables above, then check the preview. Take AGI Plan as an example (AGI Plan is a commercial partner of cdnping). It is compatible with both the OpenAI and Anthropic API formats, and any tool like Cherry Studio that accepts an endpoint URL plus an API key can connect to it. Use the exact URL given on agiplan.dev. Its service status is mirrored at /en/status/agiplan. If the check still fails after you fill in the URL, debug it the same way as above. For what to look at when choosing a gateway, see How to choose an AI API relay.

Whichever provider you use, enter model IDs exactly as the provider publishes them. Available models and regions are whatever the provider's own documentation says, and you should follow the relevant terms of service.

Checklist

Before you click Check, go through these items:

  • The provider type is correct (OpenAI-compatible / Anthropic / Gemini)
  • The preview under the input box matches the full URL in the provider's docs character for character
  • A non-/v1 path ends with /, and a non-standard path ends with #
  • The URL has no duplicated v1 or chat/completions
  • The key has no spaces or line breaks and belongs to this provider
  • The model ID matches the provider's docs exactly
  • On a 401 or model not found, leave the URL alone; only a 404 means the URL needs changing
  • On a timeout, check /en/status first, then use the home page speed test and curl to decide whether it is a network problem

Related articles

Keep reading