Anthropic usage API

Kestrel's Anthropic organisation. Base URL: this host. This is the Admin API's usage report: token counts per day, per workspace and per model. Days are UTC and run through yesterday.

Authentication

Every call sends x-api-key: <admin key> and anthropic-version: 2023-06-01. Kestrel's read-only admin key is held by the Data Platform Lead; never commit it.

Rate limit

60 calls a minute per key. Over the limit you get 429 with a retry-after header in seconds.

GET /v1/organizations/usage_report/messages

Query:

{"data": [{"starting_at": "2027-03-15T00:00:00Z", "ending_at": "2027-03-16T00:00:00Z",
  "results": [{"uncached_input_tokens": 15527820, "cache_creation": {"ephemeral_5m_input_tokens": 3845053, "ephemeral_1h_input_tokens": 0},
    "cache_read_input_tokens": 71779449, "output_tokens": 4658346, "server_tool_use": {"web_search_requests": 0},
    "workspace_id": "wrkspc_7088dd381477", "model": "claude-haiku-4-5", "api_key_id": null, "service_tier": null, "context_window": null}]}],
 "has_more": true, "next_page": "MjAyNy0wMy0xNg"}

Fields you didn't group by are null. A day with no usage has an empty results list. All cache writes are 5-minute writes.

GET /v1/organizations/workspaces

{"data": [{"id": "wrkspc_7088dd381477", "type": "workspace", "name": "eng-platform", "created_at": "2026-03-02T00:00:00Z", "archived_at": null}],
 "has_more": false, "first_id": "wrkspc_7088dd381477", "last_id": "wrkspc_0c1e…"}

Workspaces carry no department. Which department owns each workspace is kept by the business, not by Anthropic.

Prices

Kestrel pays list price, in USD per million tokens. Cost isn't served by this API: work it out from the token counts.

ModelInputOutputCache write (5 min)Cache read
claude-sonnet-4-5$3.00$15.00$3.75$0.30
claude-haiku-4-5$1.00$5.00$1.25$0.10
claude-opus-4-1$15.00$75.00$18.75$1.50