Skip to content
GET/api/v1/usage/me

Get My Usage

Return current user's aggregate usage + quota for the current billing month.

Uses existing APIUsageHourly.call_count aggregation (no new tables required for Phase 1). Task telemetry is retained for dashboard visibility but does not gate monthly quota.

Request example

json
json
{
  "tasks": [
    {
      "id": "T1",
      "duration_days": 5
    }
  ]
}

Response example

json
json
{
  "score": 92,
  "grade": "A"
}

Response fields from OpenAPI contract

This table is generated from the endpoint response schema in openapi.json.

FieldTypeRequiredDescription
user_idstringRequiredUser ID
tierstringRequiredCurrent account tier
periodobjectRequiredBilling period window (UTC month boundaries).
period.startstringRequiredPeriod start (UTC)
period.endstringRequiredPeriod end (UTC)
task_telemetryobjectOptionalTask analytics for the month. Informational; tasks do not gate the monthly quota.
task_telemetry.processed_this_monthintegerOptionalTasks processed this month
task_telemetry.avg_tasks_per_callnumberOptionalAverage tasks per call
task_telemetry.per_request_limitintegerOptionalMaximum tasks in one request
task_telemetry.payload_limit_mb_per_requestintegerOptionalMaximum request size in MB
callsobjectRequiredMonthly call quota.
calls.usedintegerRequiredCalls this billing month
calls.limitintegerRequiredMonthly call quota
calls.pctnumberRequiredPercent of the quota used
calls.overage_callsintegerRequiredCalls above the quota
calls.overage_allowedbooleanRequiredTrue when calls above the quota are billed instead of refused
keysarray<unknown>OptionalPer-key breakdown
keys[].key_idstringOptionalAPI key ID (UUID)
keys[].prefixstringOptionalKey prefix (first 8 chars visible)
keys[].tasksintegerOptionalTasks processed by this key this month
keys[].callsintegerOptionalAPI calls made by this key this month
keys[].last_usedstring | nullOptionalLast usage timestamp
warningsarray<unknown>OptionalQuota warning objects (70%/90% thresholds)
warnings[].typestringOptionalapproaching_quota (70%) or quota_critical (90%)
warnings[].metricstringOptionalMetered quantity, currently always calls
warnings[].thresholdnumberOptionalThreshold crossed, as a fraction
warnings[].current_pctnumberOptionalPercent of the quota used

Schema

json-schema
{
  "$ref": "#/components/schemas/UsageMeResponse"
}

Authentication

  • API key required

Reference details

Operation ID
get_my_usage
Section
Usage & Quota
Tags
Usage & Quota

Was this page helpful?

Your feedback helps us improve docs, reference pages, and Playground flows.

Topic: Get My Usage · Page: /docs/api-reference/get_my_usage

TermsPrivacyContact

Schedule analysis guidance. Not legal advice. You remain responsible for contract and agency compliance.