DEV Community

Api Token
Api Token

Posted on • Originally published at apitoken.sale

Use Claude Code Without a Subscription

Claude Code does not have to mean a fixed monthly plan. Point it at an API key with prepaid balance and you pay per token — ideal if your usage is spiky or you just want to try it.

Two environment variables

export ANTHROPIC_BASE_URL=https://api.apitoken.sale
export ANTHROPIC_API_KEY=sk-pool-•••

# then just run
claude
Enter fullscreen mode Exit fullscreen mode

That is the entire change. Claude Code keeps every feature — it simply bills against your prepaid balance at a discount instead of a subscription.

When pay-as-you-go wins

  • Occasional or bursty usage where a flat monthly fee is wasteful.
  • Trying Claude Code before committing to a plan.
  • Keeping several tools on one balance and one key.

Frequently asked questions

Does Claude Code work with a custom API key?

Yes. Set ANTHROPIC_BASE_URL and ANTHROPIC_API_KEY and Claude Code uses your key and balance directly.

Do I lose any features?

No. Claude Code behaves identically; only billing changes from a subscription to prepaid per-token usage.


Get a key: https://apitoken.sale/register
More guides: https://apitoken.sale/docs/learn

Originally published at apitoken.sale.

Top comments (0)