SpareTokens

Create an API key for SpareTokens

A key made just for SpareTokens, with its own spend limit and an off switch. Step by step for Anthropic, OpenAI and OpenRouter. A local model needs no key.

AnthropicOpenAIOpenRouter

Time
About 10 minutes
Cost
Nothing to set up. The setup test costs a few cents, and the default giving rule is a fixed budget of $2 a week, which you can change.
You need
An account with Anthropic, OpenAI or OpenRouter, and some credit in it. A local model needs no key at all.
You get
A key made only for SpareTokens, with its own spend limit, that you can switch off in one click.

One key, just for SpareTokens

Make a dedicated key instead of reusing one you already have. It gets its own spend limit and its own off switch, so nothing else you run can be affected, and you can see exactly what it spent. Menu names below come from each provider’s own help pages, checked on 2026-11-21. Consoles change, so if a name differs, trust the console. Not sure you have credit to use? Find your unused API credit first.

This guide has no screenshots of real accounts on purpose. Never paste a key into a chat, an email or a web page, and never share it with anyone, including us.

Anthropic (Claude Console)

  1. Sign in or sign up at platform.claude.com. This is the Claude Console, which is separate from the Claude chat app.
  2. Check your credit on the Billing page, platform.claude.com/settings/billing. Plan credit you have claimed shows under Promotional credits with its expiry date. To buy credit, use the same page.
  3. Make a workspace for SpareTokens. Open Workspaces, click Create workspace, name it SpareTokens and click Create workspace again.
  4. Set a monthly spend limit for it. Open Spend limits, and under Workspace limits pick the SpareTokens workspace and set a limit you are happy with. If it is ever reached, requests fail until you raise it or the month ends.
  5. Create the key. Open API keys and click Create key. Name it SpareTokens, choose an expiration (30 days is a good start, and Never is allowed if you will rotate it yourself), and scope it to the SpareTokens workspace. Copy the key when it is shown. If you lose it, create a new one.

Official pages: Authentication, Workspaces, Spend limits.

OpenAI (API Platform)

  1. Sign in or sign up at platform.openai.com. The API Platform has separate billing from ChatGPT.
  2. Add credit at platform.openai.com/account/billing: Add payment details, then Buy credits (the minimum is $5). Credit from a plan benefit you have claimed shows here too.
  3. Make a project for SpareTokens. Only organization owners can. Use the project selector, choose Create project, name it SpareTokens and click Create.
  4. Set the limit. On the project’s Limits page set a Monthly spend limit and turn on Enforce a hard limit. Without that switch the default is Monitor only, so requests keep going and you only get alerts. Enforcement is not instant, so spend can slightly pass the limit.
  5. Create the key. On the project’s API Keys page click Create new secret key, name it SpareTokens and keep the permissions on All (a Restricted key may fail the check setup runs). The key is shown once, so copy it now. Your key list is at platform.openai.com/api-keys.

Official pages: Projects, Prepaid billing, Finding your API key.

OpenRouter

  1. Sign in or sign up at openrouter.ai.
  2. Add credit on the Credits page. OpenRouter charges a fee on top-ups, so check the amount before you confirm.
  3. Create a key on the Keys page, and name it SpareTokens. OpenRouter keys can carry their own credit limit, so set one if the form offers it. A request that hits it is refused. Copy the key when it is shown, and make a new one if you lose it.

Official pages: FAQ and limits.

No key at all: a local model

If you have a Mac or Linux computer with Ollama, LM Studio or MLX, there is no key to make and no bill per call. Follow the local model guide.

Give the key to setup

Run setup. If it does not find a key already on your computer, it asks whether you have API credit, lets you pick your provider, and prints the page where you create the key. Then paste the key at the hidden prompt, which shows nothing as you type.

sparetokens setup

Setup checks the key with a request that lists models and spends nothing, then stores it in your computer’s keychain (the macOS Keychain, or the Linux secret service where you have one). If your computer has no keychain, setup stores nothing and prints the one line to add to your shell profile instead. The SpareTokens config only ever holds the name of the keychain item or variable, never the key, and the key is never sent to SpareTokens. See the security model.

Prefer to manage it yourself? Export the variable named in the API credit guide before running setup, and it will use that.

What it costs to try

Creating a key is free. Setup offers one tiny test task that costs a few cents and tells you the cost first. The default giving rule is a fixed budget of $2 a week, and the worker also checks a per-task and a per-day cap before every task. Your provider-side limit from the steps above is a second wall behind ours. Change the rule any time with sparetokens give, and see what keeps you in control.

Revoke or replace the key

To replace a key, create a new one the same way, then store it with the command below and delete the old one.

sparetokens key set anthropic-api

Pause giving at any time with sparetokens pause 2h, and sparetokens uninstall removes the worker.

Be told when the worker is ready

Create an account and you are in line for the private beta. We email you when it is your turn.

Get started