Gateway
Conifer Gateway quickstart
From nothing to a first answer: an account, a workspace, funds, a key and one request.
Conifer Gateway is one API for every model in its catalog, in OpenAI’s and Anthropic’s formats. This page takes you from nothing to a first answer in six steps, then shows where the rest of the docs go.
Six steps
Sign up
Open the console and create an account. If you sign up with an email address, the console mails you a link: open it to confirm the address, then sign in.
Make a workspace
A new account has no workspace yet: the console says so, and offers New workspace. Give it a name and choose Create workspace; you own the workspaces you make. A workspace holds its own API keys, balance and people.
Add funds
A request starts only when the workspace has a balance to hold it against. On the Balance page, choose Add funds: Stripe’s page takes a card, and each top-up adds $10 to $10,000 of credit, plus a fee that covers the card’s cost. The workspace’s owner and its editors add funds, and an account can add up to $500 a day until it has a top-up at least 14 days old. Billing has the figures.
Create a key
On the API keys page, choose Create key and give it a name. The key starts with
sk-cg-and is shown once, so put it in an environment variable now.terminalexport CONIFER_API_KEY="sk-cg-…"Point your client at the gateway
OpenAI’s SDKs take the API’s address with
/v1on the end. Anthropic’s SDKs take it bare, and add/v1/messagesthemselves.Client Base URL OpenAI SDKs https://gateway-api.conifer.build/v1Anthropic SDKs https://gateway-api.conifer.buildSend a first request
Each of these asks
claude-haiku-5-5to say hello. Use whichever client you have.curl
terminalcurl -i https://gateway-api.conifer.build/v1/chat/completions \ -H "Authorization: Bearer $CONIFER_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "claude-haiku-5-5", "messages": [{"role": "user", "content": "Hi"}] }'OpenAI SDK
hello.pyimport os from openai import OpenAI client = OpenAI( base_url="https://gateway-api.conifer.build/v1", api_key=os.environ["CONIFER_API_KEY"], ) reply = client.chat.completions.create( model="claude-haiku-5-5", messages=[ {"role": "user", "content": "Hi"}, ], ) print(reply.model, reply.choices[0].message.content)Anthropic SDK
hello.pyimport os from anthropic import Anthropic client = Anthropic( base_url="https://gateway-api.conifer.build", api_key=os.environ["CONIFER_API_KEY"], ) message = client.messages.create( model="claude-haiku-5-5", max_tokens=1024, messages=[ {"role": "user", "content": "Hi"}, ], ) print(message.model, message.content[0].text)The SDKs for TypeScript take the same two settings: SDKs and other clients has them.
Read what comes back
The answer is the model’s, in the format you sent, and the gateway adds what it did to the headers and to the body. This is what curl -i prints, cut short; the cost and the id are examples.
HTTP/2 200
content-type: application/json
x-conifer-request-id: req_01M8QKG70MK3272G0TP16BF898
x-request-id: req_01M8QKG70MK3272G0TP16BF898
x-conifer-model: claude-haiku-5-5
x-conifer-cost-nanousd: 5800
{"model": "claude-haiku-5-5", "choices": [ … ], "usage": { … },
"router": {"served": {"model": "claude-haiku-5-5", "provider": "anthropic"},
"fallback": false, "cost_nanousd": 5800}}| Where | What it says |
|---|---|
x-conifer-model | The model that answered, by its catalog id. The body’s model is the same model as its provider names it. |
x-conifer-cost-nanousd | What the request cost, in nanodollars: 5800 is $0.0000058. A streamed answer carries its cost in its last event instead, and so does an answer slow enough that its head went out before it was ready. |
x-conifer-request-id | The request’s id, also under x-request-id for OpenAI’s SDKs or request-id for Anthropic’s. Quote it when you write to support. |
router in the body | The same facts in one field: who served it and what it cost. |
Where to go next
For what the product is, see Conifer Gateway and Conifer Router. Every model it serves, with its prices, is in the public catalog, which Models shows how to read, and in the console’s Models section.