Usage and cost

List requests, summarize a date range, or look up one completion by its response id.

On this page

All three routes use your obk- key. The dashboard Usage report tab is the same data as GET /v1/usage/summary.

RouteRole
GET /v1/usage/summaryTotals, per model, and per day for a UTC date range.
GET /v1/usageOne page of requests, newest first, plus lifetime totals.
GET /v1/usage/{id}One request, by completion id or X-Request-Id.

Summary

Defaults to the last 30 UTC days when from and to are omitted. Optional model filter. Maximum range is 90 days. Dates are YYYY-MM-DD. from must be on or before to.

bash
curl "https://api.openbroker.gonka.gg/v1/usage/summary?from=2026-08-10&to=2026-09-08" \
  -H "Authorization: Bearer obk-YOUR_API_KEY"

The body has totals, models[], and days[] (one row per day per model). Synthetic escrow accounting lines are excluded from this report. Token counts and cost_ngonka are included.

List

bash
curl "https://api.openbroker.gonka.gg/v1/usage?page=1&page_size=50&from=2026-08-10&to=2026-09-08" \
  -H "Authorization: Bearer obk-YOUR_API_KEY"

Query parameters:

  • page — default 1
  • page_size — default 50, maximum 200
  • model — exact model id
  • status — success or error
  • from / to — UTC dates, maximum 90 days

Date filters apply to the page of rows. totals on this route stays lifetime for the account.

json
{
  "data": [
    {
      "id": "b0e3b3f9-7cd0-4446-a028-3f3d736131eb",
      "model": "MiniMaxAI/MiniMax-M2.7",
      "prompt_tokens": 41,
      "completion_tokens": 5,
      "total_tokens": 46,
      "cost_ngonka": 690,
      "cost_source": "estimated_token_price_with_retries",
      "status_code": 200,
      "x_request_id": "req-1783530713885430103-652417",
      "response_id": "devshard-24154-9825",
      "created_at": "2026-07-08T17:12:03.812Z"
    }
  ],
  "pagination": { "page": 1, "page_size": 50, "total_items": 128, "total_pages": 3 },
  "totals": { "requests": 128, "errors": 4, "tokens": 58211, "cost_ngonka": 941200000 }
}

One request

Use the id from the completion response, or the X-Request-Id header. You do not need to page through the list.

bash
curl "https://api.openbroker.gonka.gg/v1/usage/devshard-24154-9825" \
  -H "Authorization: Bearer obk-YOUR_API_KEY"

An unknown id for this key is a 404. Another account's id is not visible.

cost_source

ValueMeaning
starts with devshard_The gateway confirmed the settled cost.
estimated_token_priceComputed from prompt and completion tokens at 10 ngonka per token.
suffix _with_retriesThat estimate times 1.5, for average gateway redundancy.
suffix _plus_markupA broker markup was applied. The live markup is 0, so you should not see a charge from this.
escrow_epochOne debit per Gonka epoch: create fees for new opens, plus leftover unused lock from escrows that could not be settled on-chain, split by your share of successful tokens in that epoch. Per-escrow nano lines are not shown.
fallback_unbilledServed by a fallback path with no settled cost. Normal traffic is not billed this way.

Error rows have cost_ngonka 0. How the 10 and the 1.5 are chosen is in How token price works.