GET/api/v1/usage/keys/{key_id}
Get Key Usage
Return detailed usage for one API key owned by the authenticated user.
Request example
jsonjson
{
"tasks": [
{
"id": "T1",
"duration_days": 5
}
]
}Response example
jsonjson
{
"score": 92,
"grade": "A"
}Response fields from OpenAPI contract
This table is generated from the endpoint response schema in openapi.json.
| Field | Type | Required | Description |
|---|---|---|---|
| key_id | string | Required | API key UUID |
| key_prefix | string | Required | Visible key prefix |
| period | object | Required | Billing period window (UTC month boundaries). |
| period.start | string | Required | Period start (UTC) |
| period.end | string | Required | Period end (UTC) |
| totals | object | Required | Aggregated totals for the key |
| endpoint_breakdown | array<unknown> | Optional | No description in OpenAPI contract. |
| endpoint_breakdown[].endpoint | string | Optional | Endpoint path |
| endpoint_breakdown[].calls | integer | Optional | Calls for this endpoint |
| endpoint_breakdown[].tasks | integer | Optional | Tasks processed for this endpoint |
| endpoint_breakdown[].errors | integer | Optional | Error responses for this endpoint |
| endpoint_breakdown[].avg_response_ms | number | Optional | Average response time in ms |
| hourly | array<unknown> | Optional | No description in OpenAPI contract. |
| hourly[].hour | string | Optional | UTC hour bucket |
| hourly[].calls | integer | Optional | No description in OpenAPI contract. |
| hourly[].tasks | integer | Optional | No description in OpenAPI contract. |
| hourly[].errors | integer | Optional | No description in OpenAPI contract. |
Schema
json-schema
{
"$ref": "#/components/schemas/UsageKeyDetailResponse"
}Authentication
- API key required
Reference details
- Operation ID
- get_key_usage
- Section
- Usage & Quota
- Tags
- Usage & Quota
Was this page helpful?
Your feedback helps us improve docs, reference pages, and Playground flows.
Topic: Get Key Usage · Page: /docs/api-reference/get_key_usage