skip to content
superbot.gg

Usage & spend

What your keys and account spent: per request, per day, bucketed and across apps.

8 operations. Errors link to their row on the overview.

view .mdopenapi

Get usage over a windowlink to Get usage over a window

GET /v1/usage

With a caller key (or key=<id> from a session): that key’s burn over window, OpenRouter generation shape. From a session without key: paid-versus-list spend over period.

A caller key holding usage:read (Authorization: Bearer sbc_… or x-api-key: sbc_…), or a signed-in session.

Operation id getUsage in Usage & spend.

Query parameters

  • window string optional

    Key usage window; default day. One of day, week, month.

  • key string optional

    Key id to read (sessions only; a caller key reads itself).

  • period string optional

    Account spend period (session without key); default week. One of week, month, all.

Response 200

The key aggregate, or the account period projection.

application/json: UsageAggregate | UsagePeriod.

Errors

StatusCodeWhat to change
400invalid_request

A parameter or body field is invalid; param names it and issues lists every problem.

401unauthorized

Send a live caller key or session as Authorization: Bearer … or x-api-key. No key yet: create one at /account/api, or sign a user in at /auth.md.

403insufficient_scope

The key lacks the scope in required_scopes; mint a key that holds it.

view .mdopenapi
Request

curl

curl -sS -X GET "https://superbot.gg/v1/usage" \
  -H "Authorization: Bearer $SUPERBOT_API_KEY"

JavaScript

const res = await fetch(`https://superbot.gg/v1/usage`, {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.SUPERBOT_API_KEY}`,
  },
});
console.log(res.status, await res.json());

Python

import os
import requests

res = requests.request(
    "GET",
    "https://superbot.gg/v1/usage",
    headers={
        "Authorization": f"Bearer {os.environ['SUPERBOT_API_KEY']}",
    },
)
print(res.status_code, res.json())
Response

200 The key aggregate, or the account period projection.

"string"

400 The request is malformed or a parameter is invalid; `param` names the field.

{
  "error": "invalid_request",
  "message": "A parameter or body field is invalid; param names it and issues lists every problem.",
  "doc_url": "https://superbot.gg/developers#errors-invalid_request",
  "request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}

401 The bearer is missing, malformed or unknown.

{
  "error": "unauthorized",
  "message": "Send a live caller key or session as Authorization: Bearer … or x-api-key. No key yet: create one at /account/api, or sign a user in at /auth.md.",
  "doc_url": "https://superbot.gg/developers#errors-unauthorized",
  "request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}

403 The key lacks a scope (insufficient_scope), is revoked, or may not call this route.

{
  "error": "insufficient_scope",
  "message": "The key lacks the scope in required_scopes; mint a key that holds it.",
  "doc_url": "https://superbot.gg/developers#errors-insufficient_scope",
  "request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}

List usage per requestlink to List usage per request

GET /v1/usage/requests

One generation per request, newest first.

A caller key holding usage:read (Authorization: Bearer sbc_… or x-api-key: sbc_…), or a signed-in session.

Operation id listUsageRequests in Usage & spend.

Query parameters

  • key string optional

    Key id to read (sessions only).

  • limit integer optional

    Rows to return, 1-100; default 20.

Response 200

The generations.

application/json: UsageGenerationList.

  • object string required

    One of list.

  • data array of UsageGeneration required
    15 fields
    • request_id string
    • native_tokens_prompt number required
    • native_tokens_completion number required
    • cache_read number required
    • cache_write number required
    • total_cost number required

      USD at vendor list price.

    • cache_discount number required
    • is_byok boolean required
    • model string
    • key_label string
    • session_id string
    • latency_ms number
    • ttft_ms number
    • status integer required
    • ts string required

Errors

StatusCodeWhat to change
400invalid_request

A parameter or body field is invalid; param names it and issues lists every problem.

401unauthorized

Send a live caller key or session as Authorization: Bearer … or x-api-key. No key yet: create one at /account/api, or sign a user in at /auth.md.

403insufficient_scope

The key lacks the scope in required_scopes; mint a key that holds it.

view .mdopenapi
Request

curl

curl -sS -X GET "https://superbot.gg/v1/usage/requests" \
  -H "Authorization: Bearer $SUPERBOT_API_KEY"

JavaScript

const res = await fetch(`https://superbot.gg/v1/usage/requests`, {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.SUPERBOT_API_KEY}`,
  },
});
console.log(res.status, await res.json());

Python

import os
import requests

res = requests.request(
    "GET",
    "https://superbot.gg/v1/usage/requests",
    headers={
        "Authorization": f"Bearer {os.environ['SUPERBOT_API_KEY']}",
    },
)
print(res.status_code, res.json())
Response

200 The generations.

{
  "object": "list",
  "data": [
    {
      "request_id": "your-request-id",
      "native_tokens_prompt": 0,
      "native_tokens_completion": 0,
      "cache_read": 0,
      "cache_write": 0,
      "total_cost": 0,
      "cache_discount": 0,
      "is_byok": true,
      "model": "your-model",
      "key_label": "your-key-label",
      "session_id": "your-session-id",
      "latency_ms": 0,
      "ttft_ms": 0,
      "status": 0,
      "ts": "your-ts"
    }
  ]
}

400 The request is malformed or a parameter is invalid; `param` names the field.

{
  "error": "invalid_request",
  "message": "A parameter or body field is invalid; param names it and issues lists every problem.",
  "doc_url": "https://superbot.gg/developers#errors-invalid_request",
  "request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}

401 The bearer is missing, malformed or unknown.

{
  "error": "unauthorized",
  "message": "Send a live caller key or session as Authorization: Bearer … or x-api-key. No key yet: create one at /account/api, or sign a user in at /auth.md.",
  "doc_url": "https://superbot.gg/developers#errors-unauthorized",
  "request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}

403 The key lacks a scope (insufficient_scope), is revoked, or may not call this route.

{
  "error": "insufficient_scope",
  "message": "The key lacks the scope in required_scopes; mint a key that holds it.",
  "doc_url": "https://superbot.gg/developers#errors-insufficient_scope",
  "request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}

Get usage per UTC daylink to Get usage per UTC day

GET /v1/usage/daily

The account’s usage per UTC day across every key, with totals. A person key (one minted for a person) reads its own person’s usage here, never the account’s.

A caller key holding usage:read (Authorization: Bearer sbc_… or x-api-key: sbc_…), or a signed-in session.

Operation id getUsageDaily in Usage & spend.

Query parameters

  • from string (date) optional

    YYYY-MM-DD; default 30 days before to.

  • to string (date) optional

    YYYY-MM-DD; default today (UTC).

Response 200

One row per day.

application/json: UsageDaily.

  • from string required
  • to string required
  • days array of UsageDay required
    9 fields
    • day string required
    • tokens number required
    • tokens_in number required
    • tokens_out number required
    • cache_read number required
    • cache_write number required
    • turns integer required
    • cost_usd number required
    • charged_usd number required
  • totals object required
    6 fields
    • tokens number required
    • tokens_in number required
    • tokens_out number required
    • turns integer required
    • cost_usd number required
    • charged_usd number required

Errors

StatusCodeWhat to change
400invalid_request

A parameter or body field is invalid; param names it and issues lists every problem.

401unauthorized

Send a live caller key or session as Authorization: Bearer … or x-api-key. No key yet: create one at /account/api, or sign a user in at /auth.md.

403insufficient_scope

The key lacks the scope in required_scopes; mint a key that holds it.

view .mdopenapi
Request

curl

curl -sS -X GET "https://superbot.gg/v1/usage/daily" \
  -H "Authorization: Bearer $SUPERBOT_API_KEY"

JavaScript

const res = await fetch(`https://superbot.gg/v1/usage/daily`, {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.SUPERBOT_API_KEY}`,
  },
});
console.log(res.status, await res.json());

Python

import os
import requests

res = requests.request(
    "GET",
    "https://superbot.gg/v1/usage/daily",
    headers={
        "Authorization": f"Bearer {os.environ['SUPERBOT_API_KEY']}",
    },
)
print(res.status_code, res.json())
Response

200 One row per day.

{
  "from": "your-from",
  "to": "your-to",
  "days": [
    {
      "day": "2026-09-18",
      "tokens": 0,
      "tokens_in": 0,
      "tokens_out": 0,
      "cache_read": 0,
      "cache_write": 0,
      "turns": 0,
      "cost_usd": 0,
      "charged_usd": 0
    }
  ],
  "totals": {
    "tokens": 0,
    "tokens_in": 0,
    "tokens_out": 0,
    "turns": 0,
    "cost_usd": 0,
    "charged_usd": 0
  }
}

400 The request is malformed or a parameter is invalid; `param` names the field.

{
  "error": "invalid_request",
  "message": "A parameter or body field is invalid; param names it and issues lists every problem.",
  "doc_url": "https://superbot.gg/developers#errors-invalid_request",
  "request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}

401 The bearer is missing, malformed or unknown.

{
  "error": "unauthorized",
  "message": "Send a live caller key or session as Authorization: Bearer … or x-api-key. No key yet: create one at /account/api, or sign a user in at /auth.md.",
  "doc_url": "https://superbot.gg/developers#errors-unauthorized",
  "request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}

403 The key lacks a scope (insufficient_scope), is revoked, or may not call this route.

{
  "error": "insufficient_scope",
  "message": "The key lacks the scope in required_scopes; mint a key that holds it.",
  "doc_url": "https://superbot.gg/developers#errors-insufficient_scope",
  "request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}

Get usage bucketed and groupedlink to Get usage bucketed and grouped

GET /v1/usage/breakdown

Usage bucketed by hour or day, grouped by key, lane, role, session or model, narrowed by any filter. A person key reads its own person’s usage here, never the account’s.

A caller key holding usage:read (Authorization: Bearer sbc_… or x-api-key: sbc_…), or a signed-in session.

Operation id getUsageBreakdown in Usage & spend.

Query parameters

  • from string (date) optional

    YYYY-MM-DD; default 30 days before to.

  • to string (date) optional

    YYYY-MM-DD; default today (UTC).

  • tz string optional

    IANA zone the days and buckets are read in; default UTC.

  • bucket string optional

    Bucket width; default day. One of day, hour.

  • group string optional

    Split dimension; default none. One of none, key, lane, role, session, model.

  • key string optional

    Only rows from this key id.

  • lane string optional

    Only rows on this lane.

  • role string optional

    Only rows with this agent role.

  • session string optional

    Only rows in this session.

Response 200

Buckets, groups and totals.

application/json: UsageBreakdown.

  • from string required
  • to string required
  • tz string required
  • bucket string required

    One of day, hour.

  • group string required
  • totals UsageMetrics required
    8 fields
    • requests integer required
    • tokens_in number required
    • tokens_out number required
    • cache_read number required
    • cache_write number required
    • tokens number required

      Billed credits.

    • usd number required
    • list_usd number required
  • groups array of UsageMetrics & object required
    10 fields
    • requests integer required
    • tokens_in number required
    • tokens_out number required
    • cache_read number required
    • cache_write number required
    • tokens number required

      Billed credits.

    • usd number required
    • list_usd number required
    • id string required
    • label string required
  • buckets array of UsageMetrics & object required
    11 fields
    • requests integer required
    • tokens_in number required
    • tokens_out number required
    • cache_read number required
    • cache_write number required
    • tokens number required

      Billed credits.

    • usd number required
    • list_usd number required
    • key string required
    • start string required
    • by object required

Errors

StatusCodeWhat to change
400invalid_request

A parameter or body field is invalid; param names it and issues lists every problem.

401unauthorized

Send a live caller key or session as Authorization: Bearer … or x-api-key. No key yet: create one at /account/api, or sign a user in at /auth.md.

403insufficient_scope

The key lacks the scope in required_scopes; mint a key that holds it.

view .mdopenapi
Request

curl

curl -sS -X GET "https://superbot.gg/v1/usage/breakdown" \
  -H "Authorization: Bearer $SUPERBOT_API_KEY"

JavaScript

const res = await fetch(`https://superbot.gg/v1/usage/breakdown`, {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.SUPERBOT_API_KEY}`,
  },
});
console.log(res.status, await res.json());

Python

import os
import requests

res = requests.request(
    "GET",
    "https://superbot.gg/v1/usage/breakdown",
    headers={
        "Authorization": f"Bearer {os.environ['SUPERBOT_API_KEY']}",
    },
)
print(res.status_code, res.json())
Response

200 Buckets, groups and totals.

{
  "from": "your-from",
  "to": "your-to",
  "tz": "your-tz",
  "bucket": "day",
  "group": "your-group",
  "totals": {
    "requests": 0,
    "tokens_in": 0,
    "tokens_out": 0,
    "cache_read": 0,
    "cache_write": 0,
    "tokens": 0,
    "usd": 0,
    "list_usd": 0
  },
  "groups": [
    {
      "requests": 0,
      "tokens_in": 0,
      "tokens_out": 0,
      "cache_read": 0,
      "cache_write": 0,
      "tokens": 0,
      "usd": 0,
      "list_usd": 0,
      "id": "your-id",
      "label": "your-label"
    }
  ],
  "buckets": [
    {
      "requests": 0,
      "tokens_in": 0,
      "tokens_out": 0,
      "cache_read": 0,
      "cache_write": 0,
      "tokens": 0,
      "usd": 0,
      "list_usd": 0,
      "key": "your-key",
      "start": "your-start",
      "by": {}
    }
  ]
}

400 The request is malformed or a parameter is invalid; `param` names the field.

{
  "error": "invalid_request",
  "message": "A parameter or body field is invalid; param names it and issues lists every problem.",
  "doc_url": "https://superbot.gg/developers#errors-invalid_request",
  "request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}

401 The bearer is missing, malformed or unknown.

{
  "error": "unauthorized",
  "message": "Send a live caller key or session as Authorization: Bearer … or x-api-key. No key yet: create one at /account/api, or sign a user in at /auth.md.",
  "doc_url": "https://superbot.gg/developers#errors-unauthorized",
  "request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}

403 The key lacks a scope (insufficient_scope), is revoked, or may not call this route.

{
  "error": "insufficient_scope",
  "message": "The key lacks the scope in required_scopes; mint a key that holds it.",
  "doc_url": "https://superbot.gg/developers#errors-insufficient_scope",
  "request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}

Export usage rowslink to Export usage rows

GET /v1/usage/export

The usage rows as a CSV (default), JSON or newline-delimited JSON attachment.

A caller key holding usage:read (Authorization: Bearer sbc_… or x-api-key: sbc_…), or a signed-in session.

Operation id exportUsage in Usage & spend.

Query parameters

  • from string (date) optional

    YYYY-MM-DD; default 30 days before to.

  • to string (date) optional

    YYYY-MM-DD; default today (UTC).

  • format string optional

    Attachment format; default csv. One of csv, json, ndjson.

  • tz string optional

    IANA zone the days and buckets are read in; default UTC.

  • key string optional

    Only rows from this key id.

  • lane string optional

    Only rows on this lane.

  • role string optional

    Only rows with this agent role.

  • session string optional

    Only rows in this session.

Response 200

The rows, as an attachment.

text/csv: string.

application/json: array of object.

application/x-ndjson: string.

Errors

StatusCodeWhat to change
400invalid_request

A parameter or body field is invalid; param names it and issues lists every problem.

401unauthorized

Send a live caller key or session as Authorization: Bearer … or x-api-key. No key yet: create one at /account/api, or sign a user in at /auth.md.

403insufficient_scope

The key lacks the scope in required_scopes; mint a key that holds it.

view .mdopenapi
Request

curl

curl -sS -X GET "https://superbot.gg/v1/usage/export" \
  -H "Authorization: Bearer $SUPERBOT_API_KEY"

JavaScript

const res = await fetch(`https://superbot.gg/v1/usage/export`, {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.SUPERBOT_API_KEY}`,
  },
});
console.log(res.status, await res.json());

Python

import os
import requests

res = requests.request(
    "GET",
    "https://superbot.gg/v1/usage/export",
    headers={
        "Authorization": f"Bearer {os.environ['SUPERBOT_API_KEY']}",
    },
)
print(res.status_code, res.json())
Response

200 The rows, as an attachment.

[
  {}
]

400 The request is malformed or a parameter is invalid; `param` names the field.

{
  "error": "invalid_request",
  "message": "A parameter or body field is invalid; param names it and issues lists every problem.",
  "doc_url": "https://superbot.gg/developers#errors-invalid_request",
  "request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}

401 The bearer is missing, malformed or unknown.

{
  "error": "unauthorized",
  "message": "Send a live caller key or session as Authorization: Bearer … or x-api-key. No key yet: create one at /account/api, or sign a user in at /auth.md.",
  "doc_url": "https://superbot.gg/developers#errors-unauthorized",
  "request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}

403 The key lacks a scope (insufficient_scope), is revoked, or may not call this route.

{
  "error": "insufficient_scope",
  "message": "The key lacks the scope in required_scopes; mint a key that holds it.",
  "doc_url": "https://superbot.gg/developers#errors-insufficient_scope",
  "request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}

Get the credit balancelink to Get the credit balance

GET /v1/credits

The credit balance, the period meter and the plan.

A caller key holding billing:read (Authorization: Bearer sbc_… or x-api-key: sbc_…), or a signed-in session.

Operation id getCredits in Usage & spend.

Response 200

The balance.

application/json: Credits.

  • credits object required

    The pot view: beta, plan and permanent credits with a total.

  • balance_credits number required
  • balance_tokens number required
  • total_usage_tokens number required
  • period_usage_tokens number required
  • capacity_tokens number required
  • keys_count integer required
  • paid_usd_week number required
  • list_usd_week number required
  • saved_usd_week number required
  • plan string required
  • renews_at string

Errors

StatusCodeWhat to change
401unauthorized

Send a live caller key or session as Authorization: Bearer … or x-api-key. No key yet: create one at /account/api, or sign a user in at /auth.md.

403insufficient_scope

The key lacks the scope in required_scopes; mint a key that holds it.

view .mdopenapi
Request

curl

curl -sS -X GET "https://superbot.gg/v1/credits" \
  -H "Authorization: Bearer $SUPERBOT_API_KEY"

JavaScript

const res = await fetch(`https://superbot.gg/v1/credits`, {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.SUPERBOT_API_KEY}`,
  },
});
console.log(res.status, await res.json());

Python

import os
import requests

res = requests.request(
    "GET",
    "https://superbot.gg/v1/credits",
    headers={
        "Authorization": f"Bearer {os.environ['SUPERBOT_API_KEY']}",
    },
)
print(res.status_code, res.json())
Response

200 The balance.

{
  "credits": {},
  "balance_credits": 0,
  "balance_tokens": 0,
  "total_usage_tokens": 0,
  "period_usage_tokens": 0,
  "capacity_tokens": 0,
  "keys_count": 0,
  "paid_usd_week": 0,
  "list_usd_week": 0,
  "saved_usd_week": 0,
  "plan": "your-plan",
  "renews_at": "your-renews-at"
}

401 The bearer is missing, malformed or unknown.

{
  "error": "unauthorized",
  "message": "Send a live caller key or session as Authorization: Bearer … or x-api-key. No key yet: create one at /account/api, or sign a user in at /auth.md.",
  "doc_url": "https://superbot.gg/developers#errors-unauthorized",
  "request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}

403 The key lacks a scope (insufficient_scope), is revoked, or may not call this route.

{
  "error": "insufficient_scope",
  "message": "The key lacks the scope in required_scopes; mint a key that holds it.",
  "doc_url": "https://superbot.gg/developers#errors-insufficient_scope",
  "request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}

Get AI spend across appslink to Get AI spend across apps

GET /v1/spend

AI spend across every app on the account over a window, by provider and day.

A caller key holding usage:read (Authorization: Bearer sbc_… or x-api-key: sbc_…), or a signed-in session.

Operation id getSpend in Usage & spend.

Query parameters

  • range string optional

    Window; default 30d. One of 30d, 90d, month, custom.

  • from string (date) optional

    YYYY-MM-DD, with range=custom.

  • to string (date) optional

    YYYY-MM-DD, with range=custom.

Response 200

The spend report.

application/json: Spend.

  • from string required
  • to string required
  • currency string required

    One of USD.

  • total_usd number required
  • tied_usd number required
  • estimated_usd number required
  • unpriced_models array of string required
  • providers array of object required
    13 fields
    • provider string required
    • label string required
    • total_usd number required
    • usage_usd number required
    • purchase_usd number required
    • measured_usd number required
    • estimated_usd number required
    • plan_usd number required
    • residual_usd number | null required
    • status string required

      One of caught_up, residual, estimate_only.

    • services array of object required
      2 fields
      • service string required
      • total_usd number required
    • unpriced_usage array of object required
      7 fields
      • service string required
      • sku string required
      • quantity number required
      • unit string required

        One of tokens, requests, acu, seat-month.

      • period_start string required
      • period_end string required
      • fresh_at string required
    • sources array of object required
      3 fields
      • source string required
      • fresh_at string | null required
      • status string required

        One of ok, stale, missing.

  • series array of object required
    2 fields
    • day string required
    • providers object required

Errors

StatusCodeWhat to change
400invalid_request

A parameter or body field is invalid; param names it and issues lists every problem.

401unauthorized

Send a live caller key or session as Authorization: Bearer … or x-api-key. No key yet: create one at /account/api, or sign a user in at /auth.md.

403insufficient_scope

The key lacks the scope in required_scopes; mint a key that holds it.

view .mdopenapi
Request

curl

curl -sS -X GET "https://superbot.gg/v1/spend" \
  -H "Authorization: Bearer $SUPERBOT_API_KEY"

JavaScript

const res = await fetch(`https://superbot.gg/v1/spend`, {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.SUPERBOT_API_KEY}`,
  },
});
console.log(res.status, await res.json());

Python

import os
import requests

res = requests.request(
    "GET",
    "https://superbot.gg/v1/spend",
    headers={
        "Authorization": f"Bearer {os.environ['SUPERBOT_API_KEY']}",
    },
)
print(res.status_code, res.json())
Response

200 The spend report.

{
  "from": "your-from",
  "to": "your-to",
  "currency": "USD",
  "total_usd": 0,
  "tied_usd": 0,
  "estimated_usd": 0,
  "unpriced_models": [
    "your-unpriced-models"
  ],
  "providers": [
    {
      "provider": "your-provider",
      "label": "your-label",
      "total_usd": 0,
      "usage_usd": 0,
      "purchase_usd": 0,
      "measured_usd": 0,
      "estimated_usd": 0,
      "plan_usd": 0,
      "residual_usd": 0,
      "status": "caught_up",
      "services": [
        {}
      ],
      "unpriced_usage": [
        {}
      ],
      "sources": [
        {}
      ]
    }
  ],
  "series": [
    {
      "day": "your-day",
      "providers": {}
    }
  ]
}

400 The request is malformed or a parameter is invalid; `param` names the field.

{
  "error": "invalid_request",
  "message": "A parameter or body field is invalid; param names it and issues lists every problem.",
  "doc_url": "https://superbot.gg/developers#errors-invalid_request",
  "request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}

401 The bearer is missing, malformed or unknown.

{
  "error": "unauthorized",
  "message": "Send a live caller key or session as Authorization: Bearer … or x-api-key. No key yet: create one at /account/api, or sign a user in at /auth.md.",
  "doc_url": "https://superbot.gg/developers#errors-unauthorized",
  "request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}

403 The key lacks a scope (insufficient_scope), is revoked, or may not call this route.

{
  "error": "insufficient_scope",
  "message": "The key lacks the scope in required_scopes; mint a key that holds it.",
  "doc_url": "https://superbot.gg/developers#errors-insufficient_scope",
  "request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}

Get a usage reportlink to Get a usage report

GET /v1/usage/report

The account’s usage across every key in hourly or daily UTC buckets, grouped by any mix of key, model, lane, role, session and team, and narrowed by any filter. A person key reads its own person’s usage here, never the account’s.

A caller key holding usage:read (Authorization: Bearer sbc_… or x-api-key: sbc_…), or a signed-in session.

Operation id getUsageReport in Usage & spend.

Query parameters

  • starting_at string (date-time) optional

    RFC 3339 start, floored to the bucket width. Default: 7 days before ending_at.

  • ending_at string (date-time) optional

    RFC 3339 end (exclusive), ceiled to the bucket width. Default: the end of the current bucket. At most 92 days after starting_at.

  • bucket_width string optional

    Bucket width; default 1d. One of 1h, 1d.

  • group_by string | array of string optional

    Split each bucket by these dimensions: api_key_id, model, lane, role, session_id, team_id. Repeat the parameter or pass a comma list.

  • api_key_ids string | array of string optional

    Only usage from these caller key ids. Repeat the parameter or pass a comma list.

  • models string | array of string optional

    Only usage on these model ids. Repeat the parameter or pass a comma list.

  • lanes string | array of string optional

    Only usage on these lanes: credits, caller_key, byo. Repeat the parameter or pass a comma list.

  • roles string | array of string optional

    Only usage with these agent roles (chat for a plain turn). Repeat the parameter or pass a comma list.

  • session_ids string | array of string optional

    Only usage inside these agent runs. Repeat the parameter or pass a comma list.

  • team_ids string | array of string optional

    Only usage from keys scoped to these teams. Repeat the parameter or pass a comma list.

  • limit integer optional

    Buckets per page. 1h: default 24, max 168. 1d: default 7, max 31.

  • page string optional

    The previous response’s next_page. Repeat group_by and the filters with it.

Response 200

One page of buckets.

application/json: UsageReport.

  • object string required

    One of list.

  • data array of UsageBucket required
    4 fields
    • object string required

      One of bucket.

    • starting_at string (date-time) required
    • ending_at string (date-time) required
    • results array of UsageResult required
      14 fields
      • requests integer required
      • tokens_in number required
      • tokens_out number required
      • cache_read number required
      • cache_write number required
      • tokens number required

        Billed credits.

      • usd number required
      • list_usd number required
      • api_key_id string | null
      • model string | null
      • lane string | null
      • role string | null
      • session_id string | null
      • team_id string | null
  • has_more boolean required
  • next_page string | null required

    Pass as page for the next buckets; null on the last page.

Errors

StatusCodeWhat to change
400invalid_request

A parameter or body field is invalid; param names it and issues lists every problem.

401unauthorized

Send a live caller key or session as Authorization: Bearer … or x-api-key. No key yet: create one at /account/api, or sign a user in at /auth.md.

403insufficient_scope

The key lacks the scope in required_scopes; mint a key that holds it.

503

The account store is not ready; retry later.

view .mdopenapi
Request

curl

curl -sS -X GET "https://superbot.gg/v1/usage/report" \
  -H "Authorization: Bearer $SUPERBOT_API_KEY"

JavaScript

const res = await fetch(`https://superbot.gg/v1/usage/report`, {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.SUPERBOT_API_KEY}`,
  },
});
console.log(res.status, await res.json());

Python

import os
import requests

res = requests.request(
    "GET",
    "https://superbot.gg/v1/usage/report",
    headers={
        "Authorization": f"Bearer {os.environ['SUPERBOT_API_KEY']}",
    },
)
print(res.status_code, res.json())
Response

200 One page of buckets.

{
  "object": "list",
  "data": [
    {
      "object": "bucket",
      "starting_at": "2026-09-01T00:00:00Z",
      "ending_at": "2026-09-01T00:00:00Z",
      "results": [
        {}
      ]
    }
  ],
  "has_more": true,
  "next_page": "your-next-page"
}

400 The request is malformed or a parameter is invalid; `param` names the field.

{
  "error": "invalid_request",
  "message": "A parameter or body field is invalid; param names it and issues lists every problem.",
  "doc_url": "https://superbot.gg/developers#errors-invalid_request",
  "request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}

401 The bearer is missing, malformed or unknown.

{
  "error": "unauthorized",
  "message": "Send a live caller key or session as Authorization: Bearer … or x-api-key. No key yet: create one at /account/api, or sign a user in at /auth.md.",
  "doc_url": "https://superbot.gg/developers#errors-unauthorized",
  "request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}

403 The key lacks a scope (insufficient_scope), is revoked, or may not call this route.

{
  "error": "insufficient_scope",
  "message": "The key lacks the scope in required_scopes; mint a key that holds it.",
  "doc_url": "https://superbot.gg/developers#errors-insufficient_scope",
  "request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}

503 The account store is not ready; retry later.

(no body)