Docs
GET
/usage

Requests, errors, latency and rate limit peaks of the calling key (or, with scope=organization, of every key and connected app), as totals and per hour or day. REST and MCP calls both count. Hourly sums are kept 30 days on the free plan and 13 months on paid plans; this endpoint covers up to 30 days.

Works with any valid API key.

Authorization

bearerAuth
AuthorizationBearer <token>

API key starting with fh_

In: header

Query Parameters

period?string

24h, 7d or 30d, ending with the current hour

Default"24h"
Value in"24h" | "7d" | "30d"
granularity?string

Bucket size of series. Default: hour for 24h, day otherwise

Value in"hour" | "day"
timezone?string

IANA time zone for day buckets, e.g. Europe/Berlin. Default UTC

source?string

Only REST or only MCP calls

Value in"rest" | "mcp"
scope?string

key = only the calling API key (default). organization = every key and connected app; needs api_keys:read and a key with access to all profiles

Default"key"
Value in"key" | "organization"

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://feedhorizon.com/api/v1/usage"
{
  "data": {
    "period": "24h",
    "granularity": "hour",
    "timezone": "string",
    "from": "2026-11-10T08:00:00.000Z",
    "to": "2026-11-10T08:00:00.000Z",
    "rateLimit": {
      "limit": 0,
      "windowSeconds": 0
    },
    "totals": {
      "requests": 0,
      "errors4xx": 0,
      "errors5xx": 0,
      "rateLimited": 0,
      "avgDurationMs": 0,
      "p95DurationMs": 0,
      "peakPerMinute": 0,
      "peakAt": "2026-11-10T08:00:00.000Z"
    },
    "previousPeriodRequests": 0,
    "series": [
      {
        "start": "2026-11-10T08:00:00.000Z",
        "requests": 0,
        "errors4xx": 0,
        "errors5xx": 0,
        "rateLimited": 0,
        "peakPerMinute": 0
      }
    ],
    "operations": [
      {
        "source": "rest",
        "operation": "string",
        "requests": 0,
        "errors": 0,
        "avgDurationMs": 0,
        "p95DurationMs": 0
      }
    ],
    "errors": [
      {
        "code": "string",
        "status": 0,
        "count": 0
      }
    ],
    "callers": [
      {
        "apiKeyId": "key_0195f0a27b3c7d4e8f5a1b2c3d4e5f60",
        "name": "string",
        "kind": "api_key",
        "requests": 0,
        "errors": 0,
        "lastAt": "2026-11-10T08:00:00.000Z"
      }
    ],
    "requestsSince": "2026-11-10T08:00:00.000Z"
  }
}
{
  "error": {
    "type": "invalid_request_error",
    "code": "validation_failed",
    "message": "One or more fields are invalid, see details",
    "docUrl": "https://feedhorizon.com/docs/api/errors#invalid_request_error",
    "requestId": "req_m2x81a0kfd3h9s"
  }
}
{
  "error": {
    "type": "authentication_error",
    "code": "missing_api_key",
    "message": "No Authorization: Bearer header",
    "docUrl": "https://feedhorizon.com/docs/api/errors#authentication_error",
    "requestId": "req_m2x81a0kfd3h9s"
  }
}
{
  "error": {
    "type": "rate_limit_error",
    "code": "rate_limited",
    "message": "Too many requests. Wait the seconds in Retry-After",
    "docUrl": "https://feedhorizon.com/docs/api/errors#rate_limit_error",
    "requestId": "req_m2x81a0kfd3h9s"
  }
}
{
  "error": {
    "type": "api_error",
    "code": "internal_error",
    "message": "Something failed on our side. Retry with backoff, using the same Idempotency-Key for writes",
    "docUrl": "https://feedhorizon.com/docs/api/errors#api_error",
    "requestId": "req_m2x81a0kfd3h9s"
  }
}