
# Run lanes on your plan's API credits

Some Claude plans include a monthly amount of Console API credit. You can point your lanes at that credit, so the
headless runs bill it and your plan's usage limits are left for your own interactive sessions.

## Set it up

1. Claim the credit as described in Anthropic's
   [API credits for subscribers](https://platform.claude.com/docs/en/about-claude/api-credits-for-subscribers) docs.
   Not every plan includes it; if yours does not, this page does not apply to you.
2. Make a workspace for it, with a spend limit set at or below the credit, and create an API key in that workspace.
3. Save the key in a file outside the repo, and lock it down: `chmod 600 <file>`.
4. Point the claude provider at that file in `ade.toml`:

```toml
[providers.claude]
secrets = { ANTHROPIC_API_KEY = "<file>" }
```

Only the headless lane calls receive the key, so only they bill the credit.

## Watch out

- **An exported key bills your own session too.** If `ANTHROPIC_API_KEY` is exported in your interactive shell,
  Claude Code in that shell uses the key and bills it as well. Keep the key in the file only.
- **A warning about 1-hour cache writes.** If a claude call has the key set but its usage row shows 1-hour cache
  writes, ade marks the row `billing_suspect: true` and prints a line to stderr. A host session's plan login (such as
  one set by `CLAUDE_CODE_REMOTE`) can win over the key, so the call may be billing your plan, not the key.
- **Unused credit expires.** It does not roll over, so size your spend limit to what you will use before the cycle ends.
