HomeGuides → Base URL setup for coding agents

Base URL setup for coding agents

Every one of these tools accepts a custom endpoint. Half of them want the base URL with /v1 and half want it without, and the error you get for choosing wrong is deliberately unhelpful.

The settings, per client

ClientBase URL
Claude Codehttps://apiclan.us
Anthropic SDKhttps://apiclan.us
Codexhttps://apiclan.us/v1
Cursorhttps://apiclan.us/v1
Cline, Roo Codehttps://apiclan.us/v1
LM Studiohttps://apiclan.us/v1
Cherry Studio, Chatbox, LobeChathttps://apiclan.us/v1

Why there are two conventions

Anthropic-lineage clients build the full path themselves: you give them a host and they append /v1/messages. OpenAI-lineage clients expect the base URL to already contain /v1 and append only /chat/completions. Neither is wrong; they simply split the URL at a different point.

Put /v1 in a Claude Code config and the request goes to /v1/v1/messages. Leave it out of a Cursor config and it goes to /chat/completions. Both paths exist on no server.

Telling a path mistake from a key mistake

A wrong path returns a 404 at the edge. The request never reaches the gateway, so nothing appears in your usage history. A wrong or revoked key returns 401 and does show up. So:

Cursor's save-time check

Cursor validates the endpoint when you save settings by sending a probe request with whatever model ID is currently selected. If that ID is not one your key can reach, the check fails even though the endpoint is correct. Add a model ID from the price list by hand, select it, then save.

Where each client keeps the setting

Knowing where the value lives saves a round of guessing when a change appears not to take effect:

Put the key in an environment variable rather than a config file you might commit. Anyone holding a key can spend the balance on it.

Model names

Use the exact strings from the price list. Hyphens are not interchangeable with dots: the model is claude-fable-5-1, not claude-fable-5.1. A misspelled model name produces the same silent 404 as a wrong path, for the same reason.

Full setup walkthroughs for each client, including the model list, are in the Quickstart.

Start using it

No subscription, no monthly minimum, no sales call. Top up with USDT and spend what you use — 1 USDT gives you 2 credits of API balance.

Read the 30-second quickstart

Prices quoted on this page are regenerated automatically from live billing data. Third-party terms are quoted from that party's own published documentation.