Verified 2026-11-18 · rates follow the live catalog

LLM proxy: change the base URL, keep your code

An OpenAI-compatible LLM proxy accepts the requests your client already sends and forwards them to a model somewhere else. Adopting one should not mean rewriting anything. Three values change, and almost every failed first attempt traces back to one of them.

The three values that change

What to change when you point a client at the proxy
SettingBeforeAfter
Base URLhttps://api.openai.com/v1https://api.openference.com/v1
CredentialYour provider keyYour Openference API key, sent as a bearer token
Model idThe provider's model nameAn exact catalog name from the model list
from openai import OpenAI

client = OpenAI(
    base_url="https://api.openference.com/v1",
    api_key="YOUR_API_KEY",
)

reply = client.chat.completions.create(
    model="GLM-5.3",
    messages=[{"role": "user", "content": "ping"}],
)

The base URL is not the same for every client

Clients that speak the OpenAI format, including the OpenAI SDKs, Cursor, Cline, OpenCode and Codex, take https://api.openference.com/v1. Claude Code speaks the Anthropic Messages format and adds /v1/messages itself, so it takes the host without /v1: https://api.openference.com. Give it a base URL that already ends in /v1 and it requests /v1/v1/messages, which fails.

Claude Code also wants the credential in ANTHROPIC_AUTH_TOKEN. ANTHROPIC_API_KEY sends the key in an x-api-key header instead, and Openference authenticates with the bearer token.

Model ids are exact

The proxy does not guess. A model is selected by its catalog name, listed by GET /v1/models and on the models page. Names can include spaces and version suffixes, so copy them rather than retype them. Anthropic-style ids such as claude-sonnet-4-6 do not select a model and the request is rejected with a "model is not configured" error. That one trips up Claude Code in particular, because it sends Anthropic-style ids unless you set the three tier variables to catalog names.

What passes through and what is rewritten

When something fails on the first try

To confirm the connection before debugging anything else, call GET https://api.openference.com/v1/models with the key. A model list back means the URL and credential are right.

A proxy only forwards, while a gateway also routes, bills and scopes keys. Openference is the second kind, which is why a failed upstream does not have to become a failed request.

Model catalog · Pricing · Comparisons · Cost guides · Integration guides · FAQ
Guides: GLM coding plan alternative · Free AI API · LLM gateway · LLM proxy · Cheap AI API · OpenAI-compatible API
Model APIs: GLM API · DeepSeek API · Kimi API · Qwen API · MiniMax API