Gateway

LLM gateway for more than 230 AI models

One API key and one endpoint for models from Anthropic, OpenAI, Google and other labs, on the OpenAI and Anthropic interfaces your software already uses. Every response states which model served it and what it cost.

What the gateway does

The Conifer gateway sits between your software and the companies that serve AI models. Your applications, agents and coding tools send every request to one address with one key. The gateway checks the key and the balance, sends the request to a provider that serves the model, tries another provider if that one fails, and returns the answer with its cost.

One key
One key covers every model in the catalog, from Anthropic, OpenAI, Google, DeepSeek, Mistral, xAI, Moonshot, Z AI, Meta and other labs, including open-weights models. A key is free to hold and spends nothing until it is used.
Three interfaces
The gateway speaks the OpenAI Chat Completions, OpenAI Responses and Anthropic Messages interfaces. Existing software changes its address and key, and nothing else.
Named models
A request that names a model is served by that model or refused with a clear error. The gateway never puts a different model in its place.
Provider failover
When a provider is rate-limited, returns an error or times out, the gateway serves the same model from another provider at the same price. If no provider can serve the request, it fails and nothing is charged.
Cost receipt
Every response says which model you asked for, which model answered, and exactly what the request cost, broken down into input, output and cached tokens.
Spending limits
Set a ceiling on a single request, a spend cap on each key and a monthly limit on the account. A request over a ceiling is refused before any provider is called.
Prompt caching
On Anthropic models the gateway caches the stable part of a conversation, so a long system prompt or tool list is paid for once and read at a lower rate after that.

A request that names a model is served by that model or refused with a clear error. The gateway never puts a different model in its place.

Connect an existing client

Create a key in the console and save it in your environment as CONIFER_API_KEY. Then point your client at the gateway.

OpenAI SDK
Set the base URL and the key. Chat Completions, Responses, embeddings and the model list work unchanged.
OPENAI_BASE_URL=https://api.conifer.build/v1
OPENAI_API_KEY=$CONIFER_API_KEY
Anthropic SDK
Use the address without the version path. Anthropic models are served on the Messages interface, and every model in the catalog is available through Chat Completions.
ANTHROPIC_BASE_URL=https://api.conifer.build
ANTHROPIC_API_KEY=$CONIFER_API_KEY
From OpenRouter
Change the address and keep your model names. Names written the OpenRouter way, with the lab in front, are served as the matching Conifer model. Replace your provider key has the steps for OpenAI, Anthropic and OpenRouter.
Coding tools
Claude Code, Codex, Cursor, VS Code, Aider, Zed, opencode and Open WebUI each have a setup page under Tools.
Your own Azure resource
Put an Azure OpenAI resource behind the same Conifer key. Usage on it is billed to your Azure agreement, and Conifer adds no fee. See Bring your own endpoint.
SDKs
The open-source Conifer SDK for TypeScript and Python reads each cost receipt and sets spend ceilings. See SDK and API.

Pricing and billing

Usage is charged per token at the price the catalog publishes for each model, from a prepaid balance. There is no subscription. Before a request runs, the gateway checks that the balance can cover it; a request the balance cannot cover is refused and costs nothing. After the request, the gateway charges for the tokens actually used. Auto-recharge refills the balance from a saved card, and you can top up by hand from $5. Prices for each model are on the models page, and metering is explained in Billing and caching.

Teams

A team is an organization whose keys bill the owner’s account. Team accounts are set up by Conifer: write to us to start one. Teams in the docs has the details.

Keys
Each teammate holds their own key. Usage settles on the owner’s account at catalog prices.
Roles
Owner, admin and member. Owners and admins mint keys and see team usage.
Model scope
An admin can limit a key to a list of models. The scope follows the live catalog, so a new model needs no new key.
Revocation
Per key, in effect within seconds. Other keys are not affected.

Read more

What is an LLM gateway?
How a gateway sits between your software and the companies that serve models, and what to check when you choose one.
Conifer Router
Send one model name and Conifer chooses a model for each request from a pool you approve.
Conifer vs OpenRouter
The two gateways side by side, from each company's own documentation.
Conifer vs Portkey
The two gateways side by side, from each company's own documentation.
Conifer vs Helicone
The two gateways side by side, from each company's own documentation.
Conifer vs LiteLLM
The two gateways side by side, from each company's own documentation.
All comparisons
Conifer compared with eleven other LLM gateways and routers, from their own documentation.

Questions

What is an LLM gateway?
An LLM gateway is a service that sits between your software and the companies that serve AI models. Your applications send every request to one address with one key. The gateway forwards each request to a provider that serves the model, handles failover, and reports usage and cost.
Is the Conifer gateway compatible with the OpenAI and Anthropic SDKs?
Yes. The gateway serves the OpenAI and Anthropic interfaces, so the official OpenAI and Anthropic SDKs work once you change the base URL and the key.
Will the gateway replace the model I asked for with a different one?
No. A request that names a model is served by that model or refused with an error. Another model is tried only if you list it as a fallback yourself, and every response names the model that answered.
How do I see what a request cost?
Every response carries its cost, and a streamed response ends with the same receipt. The console shows requests and cost for each key.
Does Conifer store my prompts?
The gateway does not store the prompt of a standard request. It holds a response for ten minutes so that a retried request is not charged twice, and it keeps request details such as the model, token counts and cost for billing. The provider that serves a request handles it under its own terms. The privacy policy has the details.
What does the gateway not serve?
The moderations endpoint is not served. AWS Bedrock and Google Vertex are not available as bring-your-own endpoints today.