Credits
What each API request costs in credits, which requests are free, and what happens when a workspace runs out.
Credits
Requests made with a workspace API key use that workspace's credits. Each
response says how many in the X-Starkscan-Credits header, and how many the
workspace has left in X-Starkscan-Credits-Remaining: the month's included
credits plus prepaid credits. The remaining count runs about a minute behind,
and is absent on plans without a monthly limit and before the month's first
usage is counted.
Credits are being rolled out. Until they are switched on for a deployment,
responses carry no X-Starkscan-Credits header and no request is refused for
credits. Once the workspace has less than a fifth of the month's included
credits left, responses also carry X-Starkscan-Notice: credits_low.
What a request costs
Only successful work uses credits: a 2xx REST response, or a JSON-RPC item
that returns a result. Errors, rate-limited requests and refused requests
cost nothing.
JSON-RPC returns raw node data and is priced a little above other Starknet RPC providers. REST answers are indexed and decoded, and cost more.
REST
| Credits | What | Examples |
|---|---|---|
| 10 | One lookup by exact identifier or a status check | GET /v1/{chain}/tx/{tx_hash}, GET /v1/{chain}/token/{token}/balance-of/{address}, GET /v1/{chain}/block/{number_or_hash} |
| 30 | One page of blocks, transactions, classes or messages | GET /v1/{chain}/blocks, GET /v1/{chain}/txs, GET /v1/{chain}/classes, GET /v1/{chain}/search |
| 50 | One decoded contract read, storage read, class, or holdings and positions read | GET /v1/{chain}/contract/{address}/read, GET /v1/{chain}/class/{class_hash}, GET /v1/{chain}/address/{address}/token-holdings |
| 50 | One page of events, transfers or wallet history | GET /v1/{chain}/events, GET /v1/{chain}/address/{address}/transactions, GET /v1/{chain}/token/{token}/transfers |
| 150 | One decoded transaction trace | GET /v1/{chain}/tx/{tx_hash}/trace |
| 10,000 | One STRK20 proof, charged on the poll that delivers it | GET /v1/{chain}/prove/{job_id} |
Submitting a proof (POST /v1/{chain}/prove) costs nothing, but a workspace out
of credits gets 402. Failed, lost and expired proofs cost nothing. Proof keys
are issued on request and keep their own daily limit.
JSON-RPC
| Credits | What | Examples |
|---|---|---|
| 0 | Network info | starknet_chainId, starknet_specVersion, starknet_syncing, rpc.discover |
| 2 | One block, transaction, receipt or status read, or one signed transaction submitted | starknet_blockNumber, starknet_getBlockWithTxs, starknet_getTransactionReceipt, starknet_getStateUpdate, starknet_addInvokeTransaction |
| 3 | One state read or one events page | starknet_call, starknet_getStorageAt, starknet_getNonce, starknet_getClassAt, starknet_getEvents |
| 3 per transaction | Each transaction estimated, simulated or traced | starknet_estimateFee, starknet_simulateTransactions, starknet_estimateMessageFee, starknet_traceTransaction |
| 10 | One whole-block trace, however many transactions it holds | starknet_traceBlockTransactions |
Batches
- JSON-RPC batches: the sum of the items that returned a result.
- REST batch helpers:
POST /v1/{chain}/tx/previews,/address/summariesand/address/intelligencecost 10 credits per item.
What is free
- Key and usage management:
/v1/api-key/usageand the account routes. - Discovery:
/v1/meta/*. - Contract verification jobs.
- WebSocket streams. While credits are enforced, they need a paid plan or a
held pack: free workspaces get
403with codepaid_plan_required.
Without an API key
Where a deployment offers it, read requests work without a key: 2,000 credits
a day for each IPv4 address or IPv6 /64 network, up to 30 requests a minute,
priced like requests with a key. It covers GET reads only, not streams, job
or usage reads, holder lists or traces. Each answer carries
X-Starkscan-Notice: keyless and the credits the network has left today in
X-Starkscan-Credits-Remaining. Past the allowance, reads answer 429 with
code keyless_limit_reached until 00:00 UTC; retrying sooner does not help.
GET /v1/meta/capabilities stays free and shows the allowance in
credits.keyless.
A free key gives 1,000,000 credits a month: run starkscan login, or create one
at starkscan.co/settings/api-keys.
Monthly credits and prepaid credits
Every self-serve workspace gets 1,000,000 credits each UTC month. Included credits are used first. After that, requests use prepaid credits from top-ups, oldest expiry first. Prepaid credits last 12 months. Included credits reset on the 1st of each month (UTC).
Credits come in packs, paid in USDC or STRK on the billing page:
| Pack | Credits | Price | While you hold its credits |
|---|---|---|---|
| Developer | 10,000,000 | $49 | up to 600 REST requests a minute, 10 keys, WebSocket streams |
| Growth | 40,000,000 | $149 | up to 1,200 REST requests a minute, 25 keys, WebSocket streams |
| Business | 120,000,000 | $399 | up to 3,000 REST requests a minute, 50 keys, WebSocket streams |
A workspace has the highest pack tier it holds unexpired, unspent credits from. The tier ends when those credits run out or expire; the monthly included credits always follow the plan. Without a pack, Free allows up to 120 REST requests a minute and 3 keys.
Usage is counted every minute, so a busy key can go slightly past zero before it is stopped. That overrun is never billed.
Check prices and credits before you call
GET /v1/meta/capabilities is free and returns a credits section built from
the same code that charges requests:
mode:off,shadow(credits are counted and reported, and nobody is refused) orenforce.rpcMethods: what each JSON-RPC method costs. The methods inrpcPerTransactionMethodscost that much per transaction.keyless: whether the deployment serves reads without a key, and the daily allowance.caller: for a workspace key, the workspace's credits left (remaining) and the402code a priced request would get now (refusal,nullwhen it would be served). Without a key, the network's credits left today andkeyless_limit_reachedonce they are gone.
Each operation in routeFamilies[].operations[] also has credits and
creditUnit: call, item for the batch helpers, or jsonRpcMethod for the
JSON-RPC endpoint, where each item costs rpcMethods[method]. The
CLI adds what each command used to its JSON output.
When credits run out
Priced requests answer 402 Payment Required:
{
"code": "credits_exhausted",
"message": "This workspace has no credits left this month. Top up at https://starkscan.co/settings/billing, or wait for the reset on the 1st (UTC).",
"docSlug": "api/credits",
"requestId": "mzk-..."
}JSON-RPC calls answer with HTTP 402 and one error per item, each keeping its
id:
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32013,
"message": "This workspace has no credits left this month. ...",
"data": { "code": "credits_exhausted", "docSlug": "api/credits", "requestId": "mzk-..." }
}
}Do not retry a 402: it lasts until the workspace tops up at
starkscan.co/settings/billing or the
month resets. Free routes keep working, so a client can still read its usage.
Caps per key
A workspace can cap any of its keys at a number of credits per month on
starkscan.co/settings/billing. A key
at its cap answers 402 with code credit_cap_reached (JSON-RPC -32013
with data.code credit_cap_reached) until the month resets or the cap is
raised or removed. The workspace's other keys keep working. A new cap below
what the key already used this month applies within seconds.
{
"code": "credit_cap_reached",
"message": "This API key reached the monthly credit cap its workspace set. Raise or remove the cap at https://starkscan.co/settings/billing, or wait for the reset on the 1st (UTC).",
"docSlug": "api/credits",
"requestId": "mzk-..."
}Usage on the billing page and by email
starkscan.co/settings/billing shows credits per day for the last 30 days, each key's credits this month and the routes that used the most. The workspace owner gets an email when the month's credits reach the shares they choose there: 80% and 100% unless changed. Each share sends one email a month.