skip to content
The API key

Setup

The API key

One key covers every model on every wire. Mint it once and save it as CONIFER_API_KEY.

Mint the key

Open conifer.build/console#/keys and use Mint API key. You can do this before adding a card. A key is free to hold and spends nothing until it is used, but an account with no card has a zero balance, so its first call is refused with a 402 until pay as you go is set up. The key is shown once, so copy it now. If it ever leaks, revoke it on the same page and the gateway stops honouring it within seconds.

Give it to your tools

~/.zshrc
export CONIFER_API_KEY='sk-conifer-…'

Every tool in these docs reads that one name. OpenAI-compatible clients take the same key as OPENAI_API_KEY, with the base URL beside it.

terminal
export OPENAI_BASE_URL=https://api.conifer.build/v1
export OPENAI_API_KEY=$CONIFER_API_KEY

The Anthropic and OpenRouter versions are on Replace your provider key. Clients you can copy and paste are under SDK, and per-tool wiring starts at Tools. To put your own Azure resource behind the same key, see Azure OpenAI. You can also hand /llms.txt to a coding agent and let it do the wiring.

Sign the CLI in

terminal
conifer login

Paste the key when prompted. The CLI checks it against the gateway and stores it for your user only. Set CONIFER_SECRETS_BACKEND=keychain to keep it in the OS keychain instead. conifer login --status shows whether you are signed in and conifer logout removes the credential. On a machine where CONIFER_API_KEY is set, the CLI uses it without a login.

CI jobs

terminal
export CONIFER_ENTITLEMENT_TOKEN='eyJ...'

For a short-lived credential in CI, set this variable instead. An entitlement token expires within 24 hours and takes precedence over CONIFER_API_KEY when both are set. Mint one per job.