Usage

Checking usage and balance on 9Coding

"How much is left", "what did that call cost", "how much this month" — three questions, three places. Use the dashboard for anything you just want to glance at, and the API when you need it in your own monitoring. Every item below says where to look and what you get.

Quick reference

You want to knowWhereWhat you get
How much is leftConsole overviewAccount balance (never expires)
How the money came inWalletTop-up and credit records
What that last call costLogsPer-call tokens and unit prices
Why one call was expensiveLogs, expandedInput / output / cached tokens split
Feed it into monitoringBilling APIProgrammatic access
Which key is in useAPI keysKey list and status

In the dashboard

Account balance — console overview#

Where
Sign in; the overview is the first page of the console.
What you see
The Account balance card shows what is currently available, marked never expires. Top-ups and bonus credits share one balance, drawn down by actual usage.
Note
Balance updates in real time, but there is a brief delay between a call completing and it being settled. Checking immediately after a large run may show one or two calls still unaccounted for — refresh a few seconds later.

Top-ups and credits — wallet#

Where
Wallet, in the console sidebar.
What you see
Current balance, the top-up entry point, a breakdown of each top-up (principal and bonus listed separately), and redemption-code records.
Use it for
Reconciliation. "What I paid versus what landed" is plain here. When the balance looks off, confirm the credits here first, then look at spending in the logs.

What each call cost — logs#

Where
Logs, in the console sidebar.
What you see

Every call, one row each. Expand a row for that call's breakdown:

  • Input tokens, output tokens and cached tokens
  • Input / output / cache unit price for the model used, per million tokens
  • The amount deducted for that call
Why it matters

"Why was that one expensive" is nearly always answered here. The two usual causes: input tokens far larger than expected (a big file or long history went out with the request), or a long output (it wrote a lot of code).

Cached tokens are priced separately, and in long sessions their share is often larger than people expect — if most of your cost sits in the cache segment, the conversation history needs trimming.

Which key is in use — API keys#

Where
API keys, in the console sidebar.
What you see
Your keys and their status. One key calls every model — there are no tiers.
Suggestion
Use separate keys per purpose (local development, CI, production). You can then disable one without affecting the others, and the logs become far easier to attribute.

Over the API

To pull usage into your own dashboard or a scheduled reconciliation script, use the billing endpoints. 9Coding exposes the OpenAI-style pair:

terminal
# usage
curl -s https://api.9coding.com/v1/dashboard/billing/usage \
  -H "Authorization: Bearer $YOUR_KEY"

# subscription / quota
curl -s https://api.9coding.com/v1/dashboard/billing/subscription \
  -H "Authorization: Bearer $YOUR_KEY"
Treat the response shape as whatever your account actually returns. Field naming for these two endpoints varies between gateways, so run it once and print the structure before writing parsing code — more reliable than trusting any document, including this one. That holds for integrating any third-party API.

A useful trick: telling whether an endpoint exists

Hunting for the right path usually means trying a few. You do not need a real key for that — a deliberately invalid one is enough, because the two failure modes look completely different:

ResponseMeaning
401 + Invalid tokenThe route exists; only auth failed → a valid key will work
404 + Invalid URL (GET /xxx)The gateway has no such route → wrong path, stop trying

In other words, a 401 is good news — it means you found the right place. This exposes no real key and costs nothing.

When usage does not add up

  1. Check the call was recorded at all — find that timestamp in the logs. If the row is missing, the request never reached the server: that is a connectivity problem, not a billing one. See the connection error guide.
  2. Row exists but the amount looks wrong — expand it and read the token breakdown. Usually the input was much larger than assumed.
  3. Balance dropping faster than the logs suggest — check whether several clients share one key (local, CI and production all running at once). Separate keys make the logs attributable.
  4. Still not adding up — send us the timestamp, the model name and the full error text if any. The request id inside an error response points straight at that call.

Related