Keys, limits and billing

Prepaid credits, exact per-token billing and guardrails per key.

View as Markdown

Credits

Usage is paid from a prepaid balance that belongs to your organization. Before a request is dispatched ElevenRouter reserves an upper-bound estimate; after the response it settles the exact cost from the provider's token counts and releases the reservation. Every movement is an entry in the ledger you can inspect in the dashboard.

Pricing

Models are billed at the vendor's official list price: base input tokens, cached input tokens, cache writes and output tokens each at their published rate. Where a provider's accounting is known to be unreliable, ElevenRouter bills the smaller of the reported and estimated prompt tokens so you never pay for a provider's hidden system prompt. The per-request breakdown is available under Activity and, on request, in the route receipt. The full fee schedule is on the pricing page.

Which credits are spent first

Your balance is made of promotional credits, granted credits and purchased credits. Usage is always taken from promo credits first, then grants, then the credits you paid for, and only purchased credits are refundable. Each ledger entry shows the split.

Zero-completion insurance

A response with zero completion tokens whose finish reason is blank or error is not charged, even when the vendor bills us for processing the prompt. Failed requests are never charged. Partial streamed output that reached your client is billed for the tokens you received. Insured requests show a cost of $0 in Activity with an "insured" marker, and the route receipt reports cost.insured: true.

Key spend limits

Each key can carry a USD limit that is lifetime or resets daily, weekly or monthly (UTC). When the limit is reached requests fail with 402 key_limit_exceeded. Alerts fire at 50, 80, 90 and 100% of the limit (owners and admins are emailed at 80% and above by default). Organization-level allow-lists restrict which models keys may use.

Budgets

Budgets cap spend for the whole organization, a workspace or a single key over a daily, weekly, monthly or lifetime window. A hard budget rejects requests once the limit is reached; a soft budget only alerts. Limits must shrink as the window narrows (lifetime > monthly > weekly > daily) so the tightest cap is always the binding one. Every budget card shows the spend so far and a forecast of when the limit will be reached at the current pace.

HTTP/1.1 402 Payment Required
{
  "error": {
    "type": "insufficient_credits_error",
    "code": "budget_exceeded",
    "message": "The daily budget of $50.00 for this workspace has been reached. It resets 2026-09-16T00:00:00.000Z.",
    "metadata": {
      "budget_scope": "workspace",
      "budget_interval": "daily",
      "budget_limit": 50,
      "budget_resets_at": "2026-09-16T00:00:00.000Z"
    }
  }
}

Budgets are reached-based: the request that reaches the limit completes and the next one is rejected. Estimates are upper bounds, so estimate-based rejection would refuse legitimate requests near the cap. A budget created part-way through a period counts the spend already made in that period.

When a request is refused (402)

insufficient_creditsbalance
The prepaid balance cannot cover the upper-bound estimate for the request. Add credits or enable auto top-up.
key_limit_exceededkey limit
The key reached its lifetime or recurring spend limit. Raise it, or wait for the period to reset.
budget_exceededbudget
A hard budget on the organization, workspace or key was reached. metadata carries scope, interval, limit and reset time.

Every refusal, and every charge decision, is recorded so you can always see why a request cost what it did (or was declined) in Activity.

Rate limits (429)

Keys default to 600 requests per minute; set a lower value per key when you hand keys to untrusted clients. Responses include x-ratelimit-limit and x-ratelimit-remaining; when exceeded you receive 429 with retry-after in seconds. Vendor-side rate limits are absorbed by failover: when one credential is throttled the request moves to the next eligible endpoint, and only when every endpoint is throttled do you see a 429 from ElevenRouter.

Rotating keys

From a key's page choose Rotate: a new key is created with the same name, limits and allowed models, and the old key keeps working for an overlap window (1 hour, 24 hours or 7 days) so you can roll deployments without downtime. The old key then expires by itself.

Alerts

Low balance, budget thresholds, key spend limits, failed auto top-ups, model availability and official price changes can be delivered by email, signed webhook or Slack incoming webhook (Settings → Notifications). Webhook deliveries are JSON and signed with HMAC-SHA256:

POST /your/endpoint
X-ER-Event: alert.budget_threshold
X-ER-Delivery-Id: 5d0c…
X-ER-Timestamp: 1789999999
X-ER-Signature: v1=<hex hmac_sha256(secret, "<timestamp>.<raw body>")>

{ "id": "…", "type": "alert.budget_threshold", "severity": "warning",
  "title": "80% of the monthly workspace budget used in Acme",
  "message": "...", "url": "https://app.elevenrouter.com/settings/budgets", "data": { ... } }

Verify by recomputing the HMAC over ${X-ER-Timestamp}.${body} with the signing secret shown once when the destination was created, and reject timestamps older than five minutes. Failed deliveries are retried with backoff; a destination that fails five times in a row is disabled and the owners are emailed.

Attribution

Send HTTP-Referer and X-Title headers to tag requests with your application; they appear in the activity view for filtering and analysis.

Provisioning API (management keys)

Create a management key in the dashboard to manage inference keys programmatically, for example one key per customer of your own product. Management keys cannot run model requests; inference keys cannot call the management API.

# Create a key with a $10 monthly limit restricted to one model
curl -X POST https://elevenrouter.com/api/v1/keys \
  -H "Authorization: Bearer $ELEVENROUTER_MANAGEMENT_KEY" \
  -H "content-type: application/json" \
  -d '{ "name": "customer-42", "limit": 10, "limit_reset": "monthly", "allowed_models": ["openai/gpt-5.6-luna"] }'

# List, inspect (by id or hash), update, delete
curl https://elevenrouter.com/api/v1/keys -H "Authorization: Bearer $ELEVENROUTER_MANAGEMENT_KEY"
curl https://elevenrouter.com/api/v1/keys/<id-or-hash> -H "Authorization: Bearer $ELEVENROUTER_MANAGEMENT_KEY"
curl -X PATCH https://elevenrouter.com/api/v1/keys/<id> -H "Authorization: Bearer $ELEVENROUTER_MANAGEMENT_KEY" -d '{ "disabled": true }'
curl -X DELETE https://elevenrouter.com/api/v1/keys/<id> -H "Authorization: Bearer $ELEVENROUTER_MANAGEMENT_KEY"

POST returns the plaintext key once under key; every response carries the key record under data with limit, limit_remaining, usage, rate_limit_per_minute, allowed_models, disabled and expires_at.

Bring your own keys (BYOK)

Under Settings you can attach your own provider API keys to your organization. ElevenRouter discovers which models each key can reach and prefers your keys whenever they can serve a request; if they are denied or fail, traffic falls back to platform keys at the official price. Requests served through your keys are billed a small fee (a percentage of the official price, shown in the dashboard) instead of the token cost, because the provider bills you directly. Secrets are encrypted at rest and only decrypted in memory to sign upstream calls. The activity view marks BYOK requests, and provider.sort: "price" (or :floor) treats them as the cheapest option.

Teams

Create a team organization to share credits, keys and provider keys with colleagues. Invite people by email; they join with the role you choose — member (use and create keys), billing (manage credits), admin (manage members, keys and settings) or owner. Invitations expire after seven days and can be revoked.