Usage and credits
Coda bills the wallet a run was authorised against: the API-token account’s personal wallet, or a team wallet when the run is billed to an Enterprise team (billed_team_id). One prompt is not one credit. A run reserves a hold, then settles from metered tokens.
These endpoints use the same bearer token as the rest of the Coda API. They accept mcp:read or agents:run. They are not available on the /mcp path.
Hosts
Through the web application:
On the deployed coda-api Modal URL the same routes are served without the /coda segment (GET /v0/usage/...). Send X-API-Path: api when calling Modal directly. The Next.js proxy adds this header for /v0/* requests.
Remaining credits
GET /usage/credits returns remaining free and paid credits, the plan, and the billing period for the wallet this token bills. A personal token sees the personal wallet. A team service-account key sees that team’s wallet.
Example response:
Usage window
GET /usage returns the remaining balance plus AI usage in a window (default last 30 days):
daily[]buckets for a last-30-days graphteams[]breakdownuntaggedfor runs with noteam_id- recent
runs[]
Query parameters:
since/until: RFC 3339 timestamps. The window cannot exceed 90 days.limit: number of recent runs to include (1-200, default 50).
Look up a run or thread
Store X-Run-Id and X-Thread-Id from POST /agents.
Example per-run response:
thread_id is attached best-effort after authorisation. A run can still settle with thread_id null. Reconcile those rows from the account or team summary. Do not treat a thread rollup as the complete ledger.
Charge fields
requested_creditsis the authorisation hold reserved when the run started.billable_creditsis the metered settlement amount once pricing succeeds.charged_creditsis what was deducted. Use this for 1:1 partner credit mapping afterstatusissettledordebt. The public API does not expose the internal rate formula.tokens.prompt/tokens.completionare the settled input and output token totals.billed_team_idis the team wallet that was debited. It is null on personal-wallet runs.authorizedorpricing_pendingmeans the final charge is not ready yet. Poll the same URL.releasedmeans the hold was refunded.
Usage rows include team_id / billed_team_id, source, and run/thread ids. Where a roster or callback includes user_id, that is the actor. API-token identity is not stored on usage rows.
Dashboard
A signed-in user on the representative account can review remaining credits, a usage chart, the credit ledger, and a last-30-days usage-by-team table under Settings → Billing. Per-team attributed queries and CSV export live on Settings → Teams.
Related endpoints
GET /usage/credits: remaining balanceGET /usage: windowed usage and daily bucketsGET /usage/runs/{run_id}: one runGET /usage/threads/{thread_id}: one threadGET /usage/teams/{team_id}: one team
See the Coda API Reference for full schemas. For push delivery, see Usage callbacks.