API Reference
Usage API
Retrieve usage metrics for rate limiting.
Endpoint
GET /api/usage/{accessToken}Quick Test
curl https://huebsch.schoenreden.com/api/usage/YOUR_TOKENParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
accessToken | string | Yes | Your client access token |
Response
Success
{
"ok": true,
"val": {
"charactersUsed": 125430,
"characterLimit": 500000,
"windowStart": "2024-11-18T00:00:00.000Z",
"calculatedAt": "2024-12-18T14:30:00.000Z"
}
}| Field | Type | Description |
|---|---|---|
charactersUsed | number | Characters consumed in current window |
characterLimit | number | null | Character limit (null if unlimited) |
windowStart | string | ISO 8601 timestamp of current window start |
calculatedAt | string | ISO 8601 timestamp of when usage was calculated |
Error
{
"ok": false,
"val": {
"error": "Invalid access token",
"code": "401.2"
}
}For error codes, see Error Codes.
Usage
- Character limits and window duration are configured per client during onboarding (typically 30 days)
- Usage windows reset on a rolling basis from
windowStart - Productions exceeding limits are rejected with error
429.1 - Check usage before large batch submissions to avoid rejections