Credits & Billing

How credits work, how usage is calculated, and how to manage your balance. Free monthly grants, pay-as-you-go top-ups, and transaction history.

Credits & Billing

AnyRouter uses a credit-based billing system. Your account holds a USD balance (credits), and each API request deducts the exact cost from that balance. There are no fixed monthly fees — you only pay for the tokens you actually use.

Free monthly grant

Every account receives a $5.00 free grant at the start of each month. This is automatically credited to your balance when you make your first request in a new billing period.

The free grant is enough for thousands of requests with most models. For example:

  • ~250K output tokens from anthropic/claude-haiku-4.5
  • ~50M output tokens from meta-llama/llama-3.3-70b
  • ~25K output tokens from openai/gpt-4-turbo

Free grants do not roll over — unused credits expire at the end of the month.

How costs are calculated

Each API request is billed based on the model's per-token pricing:

Token typeBilled atNotes
Input tokensModel's input price per 1K tokensThe prompt you send
Output tokensModel's output price per 1K tokensThe completion you receive
Cached tokensProvider's cache-read rate (typically 10% of input)Tokens served from cache
Cache write tokensProvider's cache-write rate (typically 125% of input)First-time cache population

You can see per-model pricing on the models page. Every model detail page shows both standard and cache pricing.

Cost calculation example

Model: anthropic/claude-sonnet-4.6 Input: 1,000 tokens @ $0.003/1K = $0.003 Output: 500 tokens @ $0.015/1K = $0.0075 Total: $0.0105

Cached tokens reduce costs significantly. If 800 of the 1,000 input tokens were cached:

Cached: 800 tokens @ $0.0003/1K (10% of input) = $0.00024 Input: 200 tokens @ $0.003/1K = $0.0006 Output: 500 tokens @ $0.015/1K = $0.0075 Total: $0.00834 (20% savings)

Topping up

When your free grant runs out, top up your balance from the Credits dashboard. Purchases are processed via Stripe. The minimum top-up is $1.00.

Purchased credits never expire — they remain on your balance until used.

Checking your balance

Dashboard

The Credits page shows your current balance, a breakdown of free vs. purchased credits, and a full transaction history.

API

Check your balance programmatically:

BASH
bash
curl https://anyrouter.dev/api/v1/credits \
  -H "Authorization: Bearer ar-your-key"

Response:

JSON
json
{
  "total_credits": 25.00,
  "used_credits": 12.47,
  "remaining_credits": 12.53,
  "currency": "usd",
  "free_grant_this_month": 5.00,
  "free_grant_used": 4.23
}

Transaction history

List all credit transactions (purchases, usage, grants, refunds):

BASH
bash
curl "https://anyrouter.dev/api/v1/credits/transactions?limit=20" \
  -H "Authorization: Bearer ar-your-key"

Each transaction includes:

FieldDescription
typepurchase, usage, monthly_grant, refund, admin_grant, bonus
amountPositive for credits added, negative for usage deducted
model_idThe model used (for usage transactions)
balance_afterYour balance after this transaction

Insufficient balance

If a request would cause your balance to drop below zero, the API returns:

JSON
json
{
  "error": {
    "type": "insufficient_balance",
    "code": "insufficient_balance",
    "message": "Insufficient balance. Please top up your credits."
  }
}

The request is not processed — no tokens are consumed and no charge is applied. Top up your balance and retry.

Rate limits by plan

PlanRate limitFree grantBYOK
Free60 req/min$5/monthNo
Pay-as-you-go600 req/min$5/monthNo
EnterpriseCustomCustomYes

Usage in the response

Every chat completion response includes a usage object so you can track costs client-side:

JSON
json
{
  "usage": {
    "prompt_tokens": 5840,
    "completion_tokens": 120,
    "total_tokens": 5960,
    "cached_tokens": 5800
  }
}

Use these values with the model's published pricing to compute the request cost in your own code.