Bring your own key
Save your Claude or OpenAI key and call those models through the Spare API, at your provider's rates. Free, and never marked up.
With your own key saved in the console, you can call your Claude or OpenAI models through the same Spare API and key you use for Spare models: one base URL for everything, with usage for both in Activity.
For the Cost routing and fallback chains, which run in the CLI on your machine, give the CLI your provider key or subscription instead.
To use models on your own GPUs instead, see Local models.
BYOK is free. Calls made with your key are billed by your provider, at your rates, and never appear on your Spare invoice. We add no markup and no fee.
Add a key
Open Providers in the console, pick Anthropic or OpenAI, and paste the key. It is encrypted in your browser before it is sent, and only ever shown back as its last four characters. You can save more than one key per provider, give each a name, and choose which one is the default.
Which provider gets called
The provider comes from the model id you name:
| Model id | Provider |
|---|---|
anthropic/claude-sonnet-4.6 | Anthropic |
openai/gpt-5-mini | OpenAI |
Once a key is saved, GET /v1/models called with your Spare key lists the models it
unlocks.
A request for a Claude or OpenAI model without a key saved for its provider fails with 404: the model
isn't available to you.
How we handle your key
- It is used only to call the provider it belongs to, for requests you send.
- It never appears in request logs, error messages or support tools.
- Requests made with it pass through Spare to your provider. We don't store their bodies; we keep token counts and costs for your usage records.
Rotate or remove a key
Add the new key in the console, then delete the old one; requests in flight finish on the key they started with. Deleting the default key stops requests to that provider straight away.
To check, switch or remove keys from code, use the provider keys API. Adding a key is done in the console.
How is this guide?