Huebsch Docs
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_TOKEN

Parameters

ParameterTypeRequiredDescription
accessTokenstringYesYour 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"
  }
}
FieldTypeDescription
charactersUsednumberCharacters consumed in current window
characterLimitnumber | nullCharacter limit (null if unlimited)
windowStartstringISO 8601 timestamp of current window start
calculatedAtstringISO 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

On this page