⌘K
API Key Usage
Get monthly request usage stats for the authenticated API key via GET /v1/usage.
1 min read
Share
This endpoint returns usage metrics for the current API key in the active billing period.
Per-key usage, not account aggregate
/v1/usage reports usage for the key that made the request. If you have multiple keys, call this endpoint once per key.
GET /v1/usage
GET
/v1/usageReturn current-period request totals and endpoint-level request counts for the calling key.
Example Request
bash
curl https://api.askverdict.ai/v1/usage \
-H "X-Api-Key: vrd_your_api_key"Response
Response Fields
| Name | Type | Required | Description |
|---|---|---|---|
keyId | string | Required | Internal ID of the API key used for this request. |
period | string (YYYY-MM-01) | Required | Current usage period start date (first day of month). |
totalRequests | number | Required | Total requests this key made in the current period. |
byEndpoint | Record<string, number> | Required | Request count grouped by endpoint path. |
rateLimit | number | Required | Per-minute limit configured for this API key. |
Error Responses
| Status | Code | Description |
|---|---|---|
401 | API_KEY_REQUIRED | Request is authenticated without API key context |
401 | UNAUTHORIZED | Missing or invalid API key |
429 | RATE_LIMITED | Per-key request limit exceeded |
Related Endpoints
Was this page helpful?