One endpoint, 11 different settings

We parsed the configuration snippets in 114 client setup guides. 54 of them set a custom endpoint, using 11 distinct environment variable names and 262 endpoint values. This is a study of what the clients actually expect, not a survey of users.

Findings

  1. There is no standard variable name. The 11 names in our guides are not aliases of one another; the top three (OPENAI_BASE_URL, OPENAI_API_BASE, GATEWAY_BASE_URL) account for 61.0% of occurrences. Copying a snippet from a different tool is the fastest route to a setting that is silently ignored.
  2. 85.1% of endpoint values carry /v1 (223 of 262); 39 do not. The split is not cosmetic: the Anthropic SDK appends /v1/messages itself, so adding /v1 to its base URL produces a doubled path and a 404 that looks like an auth failure.
  3. Configuration guides are not evenly distributed across topics. The largest cluster here is by-tool with 32 endpoint-bearing guides. Most of the friction is at setup time, before a request is ever billed.
  4. Eight SDKs, eight different traps. The table below is the field-level version of Finding 2: a gateway makes routing a one-line change, but it does not translate one vendor's URL shape into another's.

Environment variable names by frequency

VariableOccurrences in config snippets
OPENAI_BASE_URL10
OPENAI_API_BASE8
GATEWAY_BASE_URL7
ANTHROPIC_BASE_URL5
OPENAI_LIKE_API_BASE_URL2
GOOGLE_GEMINI_BASE_URL2
OPENAI_HOST2
OPENAI_API_BASE_URL2
HYPERBOLIC_API_BASE_URL1
OPENAI_COMPATIBLE_BASE_URL1
LLM_BASE_URL1

Where the SDK expects the path

ClientSettingValue shape Trap
OpenAI Python SDKbase_urlhttps://aicomp.ai/v1Carries /v1
OpenAI Node SDKbaseURLhttps://aicomp.ai/v1Carries /v1
Anthropic SDK / Claude CodeANTHROPIC_BASE_URLhttps://aicomp.aiClient appends /v1/messages
LangChainbase_url kwarghttps://aicomp.ai/v1Non-OpenAI host may drop token usage
Vercel AI SDKcreateOpenAI({ baseURL })https://aicomp.ai/v1Not openai(); that ignores the override
Spring AIbase-url + completions-pathhttps://aicomp.aiNo /v1 in base-url
Prism PHPurlhttps://aicomp.ai/v1Default already ends in /v1
GooseOPENAI_HOSThttps://aicomp.ai/v1Not OPENAI_BASE_URL

Per-client endpoint data (54 guides)

GuideVariables used Values with /v1Values without /v1
Agno with a Custom OpenAI-Compatible Endpoint—61
aichat with a Custom OpenAI-Compatible Endpoint—60
Aider with an OpenAI-compatible endpointOPENAI_API_BASE30
Anthropic base URL in Python — working examples—45
AutoGen with a custom endpoint—40
Base URL not working: seven causes, in orderOPENAI_API_BASE, OPENAI_BASE_URL50
Bolt.diy with a Custom OpenAI-Compatible EndpointHYPERBOLIC_API_BASE_URL, OPENAI_LIKE_API_BASE_URL20
Claude API errors: 401, 404, 429 and 529, diagnosed—50
Use Claude in LangChain with a custom endpoint—22
Claude Code 401: the header is the differenceANTHROPIC_BASE_URL10
Use Claude Code with a custom API endpointANTHROPIC_BASE_URL23
claude-code-router with an OpenAI-Compatible BackendANTHROPIC_BASE_URL32
Cline with an OpenAI-compatible endpointGATEWAY_BASE_URL100
Codex CLI with a custom endpointOPENAI_BASE_URL60
Codex CLI: stream disconnected before completion—10
Continue with an OpenAI-compatible endpointGATEWAY_BASE_URL30
CrewAI with an OpenAI-compatible endpointOPENAI_API_BASE70
Crush with a Custom OpenAI-Compatible Provider—22
Cursor Agent Mode with a Custom Endpoint: What Actually RoutesANTHROPIC_BASE_URL10
Use Gemini through a custom endpoint—20
Gemini CLI 404: two causes, both in the URLGOOGLE_GEMINI_BASE_URL23
Gemini CLI with a custom endpointGOOGLE_GEMINI_BASE_URL50
Goose with a Custom OpenAI-Compatible ProviderOPENAI_API_BASE, OPENAI_BASE_URL, OPENAI_HOST70
Haystack with a custom OpenAI-compatible endpoint—10
Jan with a Custom OpenAI-Compatible Endpoint—21
Kilo Code OpenAI Compatible Base URL: What Goes in the Field, and What Gets Rejected—124
LangChain with a custom endpointOPENAI_API_BASE, OPENAI_BASE_URL60
LangChain4j with a Custom OpenAI-Compatible Endpoint—60
Langflow with a Custom OpenAI-Compatible EndpointOPENAI_API_BASE, OPENAI_COMPATIBLE_BASE_URL60
Add an OpenAI-compatible endpoint to LibreChat—20
LiteLLM with a custom OpenAI-compatible endpointGATEWAY_BASE_URL60
LlamaIndex with a custom endpoint—70
LobeChat with a Custom OpenAI-Compatible EndpointOPENAI_API_BASE, OPENAI_BASE_URL40
Mastra with a Custom OpenAI-Compatible Endpoint—50
Moving an existing OpenAI integration to one endpoint—50
n8n with an OpenAI-compatible endpointGATEWAY_BASE_URL10
Open WebUI with an OpenAI-compatible endpointGATEWAY_BASE_URL, OPENAI_API_BASE_URL30
OpenAI Agents SDK with a custom endpointOPENAI_BASE_URL50
Custom base URL in Node.js — OpenAI and Anthropic SDKsOPENAI_BASE_URL42
OpenAI-compatible API endpoints: what compatibility really covers—20
Every tool that speaks OpenAI, pointed at one endpointANTHROPIC_BASE_URL, GATEWAY_BASE_URL, OPENAI_API_BASE_URL, OPENAI_BASE_URL, OPENAI_HOST, OPENAI_LIKE_API_BASE_URL60
Use a custom endpoint with the OpenAI and Anthropic SDKsOPENAI_BASE_URL71
Streaming through a custom endpoint: the usage chunk you are not getting—30
OpenCode: prompt is too long, and the field that decides when—21
OpenCode OpenAI Compatible Provider: Setting the Base URL in opencode.json—63
Point OpenHands at an OpenAI-compatible endpointLLM_BASE_URL30
Plandex with a Custom OpenAI-Compatible ProviderOPENAI_API_BASE63
Prism PHP with a Custom OpenAI-Compatible Endpoint—81
Pydantic AI with a custom OpenAI-compatible endpointOPENAI_BASE_URL30
How to reduce Claude API cost, eight levers, measured—20
Point Roo Code at an OpenAI-compatible endpoint—40
Semantic Kernel with a Custom OpenAI-Compatible Endpoint—30
Spring AI with a Custom OpenAI-Compatible Endpoint—15
Vercel AI SDK with a custom endpointGATEWAY_BASE_URL30

Configuration guides by cluster

ClusterGuides with endpoint config
by-tool32
base-url14
errors6
migration1
cost1

Method and limits

We scanned the <code> and <pre> snippets of the 114 publicly published client guides on this site, took environment variable names matching an uppercase *BASE_URL / *API_BASE / *HOST pattern, and counted absolute HTTP(S) endpoint values. This is documentation parsing, not telemetry: the sample is limited to tools we have written guides for, repeatedly used example values are counted each time they appear, and the counts describe our corpus rather than the whole ecosystem. It is useful as a compatibility checklist and as a machine-readable index of exact settings; it is not a market-share estimate.

Cite or reuse this study

Released under CC BY 4.0. Suggested citation: aitokensai.com (2026). Custom base URL compatibility: client configuration index. Retrieved YYYY-MM-DD. CC BY 4.0.

Machine-readable exports: JSON and CSV. Custom base URL compatibility: client configuration index is derived only from the observations described in Method below; no vendor list-price claim is made where the upstream did not publish one.

Related research

FAQ

Should my base URL end in /v1?

It depends on the client. The OpenAI SDKs and most OpenAI-compatible tools expect the /v1 path in the value; the Anthropic SDK and Claude Code append /v1/messages themselves. The per-SDK table on this page lists the shape for eight common clients.

Is this based on real user telemetry?

No. The numbers come from parsing configuration snippets in our own published setup guides. They describe our corpus of clients, not usage frequency in the wild, and the Method section states that limit plainly.

Why does a 404 sometimes look like an authentication error?

A doubled or missing /v1 path can make the client report an auth-shaped failure before it ever validates the key. Confirm the base URL shape first, then check the key, then the model ID, that order isolates the cause fastest.

Check the current rate for your model before you commit a workload.