Troubleshooting · Zed

Zed api_url for Anthropic — Custom Base URL Setup and the /v1/v1 404

How to point Zed's Anthropic provider at a custom endpoint with language_models.anthropic.api_url, and why appending /v1 produces 404s from a doubled path.

What you see

zed custom anthropic api url

Why it happens

  • api_url was set including /v1, and Zed appends API paths itself — the request goes to /v1/v1/messages, which does not exist.
  • The api_url was added under the wrong settings key or with a typo, so Zed silently keeps using the default endpoint.
  • The endpoint is right but the selected model id is one it does not serve, which is the other source of 404s.

How to fix it

  • Set api_url to the origin only and let Zed build the paths.
  • Put the setting exactly at language_models.anthropic.api_url in settings.json — a misplaced key does not error, it just does nothing.
  • If the 404 body names a model, the path is fine and the model id is the problem: list the endpoint's models and pick a served id.

Correct settings.json

{
  "language_models": {
    "anthropic": {
      "api_url": "https://api.apitoken.sale"
    }
  }
}
// wrong: "api_url": "https://api.apitoken.sale/v1"  → /v1/v1/messages → 404

Related searches

  • zed api_url not working
  • {"type":"error","error":{"type":"not_found_error","message":"Not found"}}

FAQ

Should the Zed api_url include /v1?+
No. Zed appends /v1/messages itself. An api_url ending in /v1 produces a doubled /v1/v1 path and a 404.
How do I know my custom api_url is actually in effect?+
Break it intentionally for one request (a nonsense host) — if nothing changes, Zed is not reading the key you edited; fix the settings path.
The path is right but I still get 404 — why?+
The 404 body usually names the missing thing. If it names a model, select an id the endpoint serves; list them via GET /v1/models.

Skip the broken setup

apiToken.sale serves the standard Anthropic API — same models, same SDKs, one prepaid balance. Point your tool's base URL at it, and the config on this page works as written.