CyberRXN Docs
APIAPI reference

Calls in a billing period

GET /v1/usage

GET /v1/usage

API overview · OpenAPI

Needs usage:read; readable with a web-app session, an API key or an OAuth token, for that credential's account. Member names and e-mails are included only for web-app sessions.

Authorization

This operation requires a bearer credential. The description defines additional role, scope or first-party-session restrictions; an API key does not grant those permissions by itself.

Parameters

PropertyTypeRequiredDetails
period (query)string ∣ nullnoYYYY-MM; defaults to the current month

Request body

No request body.

Responses

HTTPDetailsType
200Successful Responseapplication/json: Usage
401Unauthorizedapplication/problem+json: ProblemDetails
403Forbiddenapplication/problem+json: ProblemDetails
404Not Foundapplication/problem+json: ProblemDetails
422Unprocessable Entityapplication/problem+json: ProblemDetails

Response: Usage

PropertyTypeRequiredDetails
account_idstringyes
periodstringyesCalendar month in UTC, YYYY-MM.
period_startstringyes
period_endstringyesExclusive.
planstringyes
included_callsintegeryes
used_callsintegeryesSuccessful or reserved live calls; sandbox calls are separate.
test_callsintegeryes
test_included_callsintegeryes
billed_microusdintegeryesActual net prepaid spend, USD millionths, including in-flight reservations.
credit_balance_microusdintegeryes
trial_eligiblebooleanyes
recent_callsCallLog[]yesLast 50 live and sandbox attempts; no request bodies or secrets.
overage_callsintegeryes
overage_usd_per_1000numberyes
estimated_overage_usdnumberyes
hard_limitinteger ∣ nullyesLive count funded by allowance and remaining credits; null for internal accounts.
by_dayDayUsage[]yes
by_toolToolUsage[]yes
by_channelChannelUsage[]yes
by_userUserUsage[]yes
by_keyKeyUsage[]yesCalls made with API keys.
by_connectionConnectionUsage[]yesCalls made through OAuth clients (ChatGPT, Claude…).
Full schema
{
  "properties": {
    "account_id": {
      "type": "string",
      "title": "Account Id"
    },
    "period": {
      "type": "string",
      "title": "Period",
      "description": "Calendar month in UTC, YYYY-MM."
    },
    "period_start": {
      "type": "string",
      "format": "date",
      "title": "Period Start"
    },
    "period_end": {
      "type": "string",
      "format": "date",
      "title": "Period End",
      "description": "Exclusive."
    },
    "plan": {
      "type": "string",
      "title": "Plan"
    },
    "included_calls": {
      "type": "integer",
      "title": "Included Calls"
    },
    "used_calls": {
      "type": "integer",
      "title": "Used Calls",
      "description": "Successful or reserved live calls; sandbox calls are separate."
    },
    "test_calls": {
      "type": "integer",
      "title": "Test Calls"
    },
    "test_included_calls": {
      "type": "integer",
      "title": "Test Included Calls"
    },
    "billed_microusd": {
      "type": "integer",
      "title": "Billed Microusd",
      "description": "Actual net prepaid spend, USD millionths, including in-flight reservations."
    },
    "credit_balance_microusd": {
      "type": "integer",
      "title": "Credit Balance Microusd"
    },
    "trial_eligible": {
      "type": "boolean",
      "title": "Trial Eligible"
    },
    "recent_calls": {
      "items": {
        "$ref": "#/components/schemas/CallLog"
      },
      "type": "array",
      "title": "Recent Calls",
      "description": "Last 50 live and sandbox attempts; no request bodies or secrets."
    },
    "overage_calls": {
      "type": "integer",
      "title": "Overage Calls"
    },
    "overage_usd_per_1000": {
      "type": "number",
      "title": "Overage Usd Per 1000"
    },
    "estimated_overage_usd": {
      "type": "number",
      "title": "Estimated Overage Usd"
    },
    "hard_limit": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Hard Limit",
      "description": "Live count funded by allowance and remaining credits; null for internal accounts."
    },
    "by_day": {
      "items": {
        "$ref": "#/components/schemas/DayUsage"
      },
      "type": "array",
      "title": "By Day"
    },
    "by_tool": {
      "items": {
        "$ref": "#/components/schemas/ToolUsage"
      },
      "type": "array",
      "title": "By Tool"
    },
    "by_channel": {
      "items": {
        "$ref": "#/components/schemas/ChannelUsage"
      },
      "type": "array",
      "title": "By Channel"
    },
    "by_user": {
      "items": {
        "$ref": "#/components/schemas/UserUsage"
      },
      "type": "array",
      "title": "By User"
    },
    "by_key": {
      "items": {
        "$ref": "#/components/schemas/KeyUsage"
      },
      "type": "array",
      "title": "By Key",
      "description": "Calls made with API keys."
    },
    "by_connection": {
      "items": {
        "$ref": "#/components/schemas/ConnectionUsage"
      },
      "type": "array",
      "title": "By Connection",
      "description": "Calls made through OAuth clients (ChatGPT, Claude…)."
    }
  },
  "type": "object",
  "required": [
    "account_id",
    "period",
    "period_start",
    "period_end",
    "plan",
    "included_calls",
    "used_calls",
    "test_calls",
    "test_included_calls",
    "billed_microusd",
    "credit_balance_microusd",
    "trial_eligible",
    "recent_calls",
    "overage_calls",
    "overage_usd_per_1000",
    "estimated_overage_usd",
    "hard_limit",
    "by_day",
    "by_tool",
    "by_channel",
    "by_user",
    "by_key",
    "by_connection"
  ],
  "title": "Usage"
}

This page is generated from OpenAPI; examples are schemas, not a fabricated successful response.

Usage and billing · Structured errors

On this page