๐Ÿ“„ claude/api/admin-api/usage-cost/get-cost-report

File: get-cost-report.md | Updated: 11/15/2025

Source: https://docs.claude.com/en/api/admin-api/usage-cost/get-cost-report

Agent Skills are now available! Learn more about extending Claude's capabilities with Agent Skills .

Claude Docs home pagelight logodark logo

US

English

Search...

Ctrl K

Search...

Navigation

Usage and Cost

Get Cost Report

Home Developer Guide API Reference Model Context Protocol (MCP) Resources Release Notes

cURL

cURL

Copy

curl "https://api.anthropic.com/v1/organizations/cost_report\
?starting_at=2025-08-01T00:00:00Z\
&group_by[]=workspace_id\
&group_by[]=description\
&limit=1" \
  --header "anthropic-version: 2023-06-01" \
  --header "content-type: application/json" \
  --header "x-api-key: $ANTHROPIC_ADMIN_KEY"

200

4XX

Copy

{
  "data": [\
    {\
      "starting_at": "2025-08-01T00:00:00Z",\
      "ending_at": "2025-08-02T00:00:00Z",\
      "results": [\
        {\
          "currency": "USD",\
          "amount": "123.78912",\
          "workspace_id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",\
          "description": "Claude Sonnet 4 Usage - Input Tokens",\
          "cost_type": "tokens",\
          "context_window": "0-200k",\
          "model": "claude-sonnet-4-20250514",\
          "service_tier": "standard",\
          "token_type": "uncached_input_tokens"\
        }\
      ]\
    }\
  ],
  "has_more": true,
  "next_page": "page_MjAyNS0wNS0xNFQwMDowMDowMFo="
}

GET

/

v1

/

organizations

/

cost_report

cURL

cURL

Copy

curl "https://api.anthropic.com/v1/organizations/cost_report\
?starting_at=2025-08-01T00:00:00Z\
&group_by[]=workspace_id\
&group_by[]=description\
&limit=1" \
  --header "anthropic-version: 2023-06-01" \
  --header "content-type: application/json" \
  --header "x-api-key: $ANTHROPIC_ADMIN_KEY"

200

4XX

Copy

{
  "data": [\
    {\
      "starting_at": "2025-08-01T00:00:00Z",\
      "ending_at": "2025-08-02T00:00:00Z",\
      "results": [\
        {\
          "currency": "USD",\
          "amount": "123.78912",\
          "workspace_id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",\
          "description": "Claude Sonnet 4 Usage - Input Tokens",\
          "cost_type": "tokens",\
          "context_window": "0-200k",\
          "model": "claude-sonnet-4-20250514",\
          "service_tier": "standard",\
          "token_type": "uncached_input_tokens"\
        }\
      ]\
    }\
  ],
  "has_more": true,
  "next_page": "page_MjAyNS0wNS0xNFQwMDowMDowMFo="
}

The Admin API is unavailable for individual accounts. To collaborate with teammates and add members, set up your organization in Console โ†’ Settings โ†’ Organization.

Headers

โ€‹

x-api-key

string

required

Your unique Admin API key for authentication.

This key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the Console .

โ€‹

anthropic-version

string

required

The version of the Claude API you want to use.

Read more about versioning and our version history here .

Query Parameters

โ€‹

limit

integer

default:7

Maximum number of time buckets to return in the response.

Required range: 1 <= x <= 31

Examples:

7

โ€‹

page

string<date-time> | null

Optionally set to the next_page token from the previous response.

Examples:

"page_MjAyNS0wNS0xNFQwMDowMDowMFo="

null

โ€‹

starting_at

string<date-time>

required

Time buckets that start on or after this RFC 3339 timestamp will be returned. Each time bucket will be snapped to the start of the minute/hour/day in UTC.

Examples:

"2024-10-30T23:58:27.427722Z"

โ€‹

ending_at

string<date-time> | null

Time buckets that end before this RFC 3339 timestamp will be returned.

Examples:

"2024-10-30T23:58:27.427722Z"

โ€‹

group_by[]

enum<string>[] | null

Group by any subset of the available options.

Show child attributes

Examples:

"workspace_id"

"description"

โ€‹

bucket_width

enum<string>

Time granularity of the response data.

Available options:

| Title | Const | | --- | --- | | CostReportTimeBucketWidth | 1d |

Response

200

application/json

Successful Response

โ€‹

data

CostReportTimeBucket ยท object[]

required

Show child attributes

โ€‹

has_more

boolean

required

Indicates if there are more results.

โ€‹

next_page

string<date-time> | null

required

Token to provide in as page in the subsequent request to retrieve the next page of data.

Examples:

"page_MjAyNS0wNS0xNFQwMDowMDowMFo="

null

Was this page helpful?

YesNo

Get Usage Report for the Messages API Get Claude Code Usage Report

Assistant

Responses are generated using AI and may contain mistakes.