Source: https://sparetokens.ai/docs/providers
Description: Which AI accounts and local models the SpareTokens worker supports, including Anthropic, OpenAI, xAI, OpenRouter and Ollama, and how to connect each one.

[Home](https://sparetokens.ai/) / [Docs](https://sparetokens.ai/docs) / Providers

# Providers

Which AI accounts and local models the SpareTokens worker supports, and how each one is connected under your own account.

The worker is provider-pluggable. You pick where the model comes from, and every provider keeps its credentials on your machine. The coordinator only receives the task result, a few small artifact files, and usage numbers.

## Supported providers
| Provider | What it uses | Usage reported |
| `anthropic-api` | Your `ANTHROPIC_API_KEY`, run through the Claude Agent SDK with an OS-sandboxed shell and a tool allowlist. Web search available. | Dollars and tokens |
| `claude-code` | **Off.** A Claude subscription login is not supported: Anthropic's terms bar automated use of consumer plans. Use `anthropic-api` instead. | Not applicable |
| `openai-api` | Your `OPENAI_API_KEY`, with the built-in tool loop and a sandboxed shell. | Tokens (dollars if you pass prices) |
| `codex` | **Off for a ChatGPT login.** Using a ChatGPT plan for automated work like this is not permitted by OpenAI's terms as we read them. Use `openai-api` instead. | Not applicable |
| `xai` | Your `XAI_API_KEY` (Grok, through the OpenAI-compatible API). | Tokens (dollars if you pass prices) |
| `openrouter` | Your `OPENROUTER_API_KEY`. | Dollars as reported by OpenRouter, and tokens |
| `local` | Any OpenAI-compatible server you run: Ollama, LM Studio or an MLX server, through `--base-url`. | Tokens and wall-clock seconds |
| `none` | No model at all. Runs only solver tasks (`run_solver` and `re_verify`) in the OS sandbox. | Wall time only |

Literature tasks need web search, which only the Anthropic API provider offers today.

## Capability tiers

Each provider and model declares a tier, and the coordinator only hands out task types that tier can do. Verification protects the results either way, so routing just saves your time.
- **Tier 1:** small or local models, for solver runs and re-verification. No model is needed at all for these.
- **Tier 2:** mid-size models, for literature checks and model-written computation tasks.
- **Tier 3:** frontier models, for referee reviews and Lean formalization.

Defaults: `local` is tier 1, and a local model of 70B or more counts as tier 2. Models whose name contains `mini`, `nano` or `haiku` are tier 2. Other Claude and GPT models are tier 3. OpenRouter is tier 2 unless the model is a known frontier model. Override with `--tier` if you know better. See [task types and tiers](https://sparetokens.ai/docs/tasks-and-tiers).

## Use a dedicated project or service-account key

Where your provider offers projects, workspaces or service accounts, create one just for SpareTokens and make the worker's key inside it, rather than reusing a personal key or an organization-wide key. OpenAI support suggested this approach for workers like ours. It has real benefits:
- **Its own limit.** Set a spend limit on the project or workspace. That limit protects you at the provider, next to the cap you set in the worker. Two caps are better than one.
- **Its own usage report.** You can see exactly what the worker used, separate from your other tools.
- **Its own revocation.** If you ever want to stop, delete the key or the project, and nothing else you run is affected.
- **Least privilege.** A key that can only do model calls cannot change billing or other settings. Give it no more access than it needs.

The names differ by provider. OpenAI has projects with project API keys and service accounts, and Anthropic has workspaces in the Console with their own keys and limits. Check your provider's console for the current names and limits. A team or lab doing a pilot should use this too (see [the team guide](https://sparetokens.ai/start/teams)). Keep the key out of the SpareTokens config as always: the worker reads it by name, such as `env:OPENAI_API_KEY`, and it never leaves your machine.

## Provider terms

Consumer subscriptions are not supported. Anthropic's Consumer Terms bar access "through automated or non-human means, whether through a bot, script, or otherwise" except with an API key, and OpenAI's and Google's consumer terms restrict automated use too. So SpareTokens never uses a Claude, ChatGPT or Gemini plan login, and the worker refuses one with a message pointing here. API keys and local models are the way to contribute. Need a key? [Create one step by step](https://sparetokens.ai/start/api-key). Not sure you have API credit? [Find your unused API credit](https://sparetokens.ai/credits): some plans include monthly credit you can claim, and it expires if unused. We re-check provider terms every month and will update this page if a provider explicitly permits more.
- API keys are billed by the provider to you, and the key stays on your machine. Prepaid or expiring API credit is a good fit. Use a key with a spend limit, and set a budget in the worker.
- Local models run on your hardware and cost you electricity and wall-clock time.
- SpareTokens never pools, resells or transfers anyone's credit.
- Your provider account and key are yours to protect. Use your own account, keep keys on your machine, follow your provider's terms, and set a spend limit at the provider too.

Names of providers belong to their owners. SpareTokens is independent and not affiliated with or endorsed by any of them.

## Connecting a source

Keys are referenced by name, such as an environment variable, and never copied into the SpareTokens config. In the configuration commands, add a source with a provider and a credential reference:

```
sparetokens config add-source work-api --provider anthropic-api --credential env:ANTHROPIC_API_KEY
```

Then choose a rule for it on the [giving styles](https://sparetokens.ai/docs/giving-styles) page, and see every option in the [CLI reference](https://sparetokens.ai/docs/cli).

---
Part of SpareTokens (https://sparetokens.ai/). Full site index for agents: https://sparetokens.ai/llms.txt
