# Get usage summary

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://admin-api.alchemy.com/v1/usage/summary

Retrieves usage totals for the current billing period and recent rolling windows.

Reference: https://www.alchemy.com/docs/admin-api/usage/get-usage-summary

## Headers

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Authorization | string | Yes | Access key. > ⚠️ This is not an app API key. Learn how to [create an access key](https://www.alchemy.com/docs/how-to-create-access-keys). |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://admin-api.alchemy.com/v1/usage/summary \
  --header 'Authorization: Bearer <Access Key>'
```

### JavaScript

```javascript
const options = {method: 'GET', headers: {Authorization: 'Bearer <Access Key>'}};

fetch('https://admin-api.alchemy.com/v1/usage/summary', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://admin-api.alchemy.com/v1/usage/summary"

headers = {"Authorization": "Bearer <Access Key>"}

response = requests.get(url, headers=headers)

print(response.text)
```

### Go

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://admin-api.alchemy.com/v1/usage/summary"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <Access Key>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
```

### Java

```java
HttpResponse<String> response = Unirest.get("https://admin-api.alchemy.com/v1/usage/summary")
  .header("Authorization", "Bearer <Access Key>")
  .asString();
```

### C#

```csharp
using RestSharp;


var options = new RestClientOptions("https://admin-api.alchemy.com/v1/usage/summary");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <Access Key>");
var response = await client.GetAsync(request);

Console.WriteLine("{0}", response.Content);

```


## Operation Specification

```yaml
path: /v1/usage/summary
method: GET
operation:
  operationId: GetUsageSummary
  responses:
    '200':
      description: Retrieved usage summary successfully
      content:
        application/json:
          schema:
            description: |-
              Standard API response wrapper.
              All API responses are wrapped in this format for consistency.
            properties:
              data:
                properties:
                  billingPeriod:
                    properties:
                      endTime:
                        type: string
                        description: Start of the next billing period as an ISO 8601 UTC timestamp.
                      startTime:
                        type: string
                        description: Start of the current billing period as an ISO 8601 UTC timestamp.
                    required:
                      - endTime
                      - startTime
                    type: object
                    description: Current calendar-month billing window in UTC.
                  totals:
                    properties:
                      last30Days:
                        description: Usage over the last 30 days.
                        properties:
                          amount:
                            type: string
                            description: Product-native amount in the associated MoneyUnit.
                          unit:
                            type: string
                            description: Billing service MoneyUnit enum name.
                            example: ALCHEMY_COMPUTE_UNIT
                          usd:
                            type: string
                            description: Estimated fiat equivalent in USD, formatted to two decimal places.
                            example: '10.50'
                        required:
                          - amount
                          - unit
                        type: object
                        additionalProperties: false
                      last7Days:
                        description: Usage over the last 7 days.
                        properties:
                          amount:
                            type: string
                            description: Product-native amount in the associated MoneyUnit.
                          unit:
                            type: string
                            description: Billing service MoneyUnit enum name.
                            example: ALCHEMY_COMPUTE_UNIT
                          usd:
                            type: string
                            description: Estimated fiat equivalent in USD, formatted to two decimal places.
                            example: '10.50'
                        required:
                          - amount
                          - unit
                        type: object
                        additionalProperties: false
                      monthToDate:
                        description: Usage from the start of the current billing period through now.
                        properties:
                          amount:
                            type: string
                            description: Product-native amount in the associated MoneyUnit.
                          unit:
                            type: string
                            description: Billing service MoneyUnit enum name.
                            example: ALCHEMY_COMPUTE_UNIT
                          usd:
                            type: string
                            description: Estimated fiat equivalent in USD, formatted to two decimal places.
                            example: '10.50'
                        required:
                          - amount
                          - unit
                        type: object
                        additionalProperties: false
                    required:
                      - last30Days
                      - last7Days
                      - monthToDate
                    type: object
                    description: |-
                      Usage totals for the current billing period and recent rolling windows.
                      If a window starts before the available history for your plan, the API clamps the start and omits older data.
                  usageLimit:
                    description: Team usage cap for the current billing period. Omitted when no hard cap is set.
                    properties:
                      unit:
                        description: Cap unit. `CU` or `USD`.
                        enum:
                          - CU
                          - USD
                        type: string
                      limit:
                        type: string
                        description: Cap amount in `unit`.
                      used:
                        type: string
                        description: Usage counted against the cap for the current billing period.
                      remaining:
                        type: string
                        description: Unused amount under the cap.
                      percentUsed:
                        type: number
                        format: double
                        description: Percent of the cap used, from 0 to 100.
                    required:
                      - unit
                      - limit
                      - used
                    type: object
                    additionalProperties: false
                  freshness:
                    description: How current the usage data is.
                    properties:
                      dataThrough:
                        type: string
                        description: Latest timestamp included in this response.
                      containsPartialToday:
                        type: boolean
                        description: True when the query range includes the current UTC day.
                      updateCadence:
                        description: How often usage data is updated. Always `minute`.
                        enum:
                          - minute
                        type: string
                    required:
                      - dataThrough
                      - containsPartialToday
                      - updateCadence
                    type: object
                    additionalProperties: false
                required:
                  - billingPeriod
                  - totals
                  - freshness
                type: object
                additionalProperties: false
            required:
              - data
            type: object
            additionalProperties: false
    '401':
      description: Requires authentication
      content:
        application/json:
          schema:
            description: |-
              Standard error response wrapper.
              All error responses are wrapped in this format for consistency.
            properties:
              error:
                properties:
                  message:
                    type: string
                  code:
                    anyOf:
                      - type: integer
                        format: int32
                      - enum:
                          - 500
                          - 400
                          - 401
                          - 403
                          - 404
                          - 200
                          - 201
                          - 1000
                          - 2000
                        type: number
                  status:
                    type: integer
                    format: int32
                  context:
                    description: Additional information about the error specific to the endpoint.
                    properties: {}
                    type: object
                    additionalProperties: {}
                required:
                  - message
                  - code
                  - status
                type: object
                additionalProperties: false
            required:
              - error
            type: object
            additionalProperties: false
          examples:
            Example 1:
              value:
                error:
                  code: 401
                  status: 401
                  message: Requires authentication
    '403':
      description: Forbidden
      content:
        application/json:
          schema:
            description: |-
              Standard error response wrapper.
              All error responses are wrapped in this format for consistency.
            properties:
              error:
                properties:
                  message:
                    type: string
                  code:
                    anyOf:
                      - type: integer
                        format: int32
                      - enum:
                          - 500
                          - 400
                          - 401
                          - 403
                          - 404
                          - 200
                          - 201
                          - 1000
                          - 2000
                        type: number
                  status:
                    type: integer
                    format: int32
                  context:
                    description: Additional information about the error specific to the endpoint.
                    properties: {}
                    type: object
                    additionalProperties: {}
                required:
                  - message
                  - code
                  - status
                type: object
                additionalProperties: false
            required:
              - error
            type: object
            additionalProperties: false
          examples:
            Example 1:
              value:
                error:
                  code: 403
                  status: 403
                  message: Forbidden
    '404':
      description: Not found
      content:
        application/json:
          schema:
            description: |-
              Standard error response wrapper.
              All error responses are wrapped in this format for consistency.
            properties:
              error:
                properties:
                  message:
                    type: string
                  code:
                    anyOf:
                      - type: integer
                        format: int32
                      - enum:
                          - 500
                          - 400
                          - 401
                          - 403
                          - 404
                          - 200
                          - 201
                          - 1000
                          - 2000
                        type: number
                  status:
                    type: integer
                    format: int32
                  context:
                    description: Additional information about the error specific to the endpoint.
                    properties: {}
                    type: object
                    additionalProperties: {}
                required:
                  - message
                  - code
                  - status
                type: object
                additionalProperties: false
            required:
              - error
            type: object
            additionalProperties: false
          examples:
            Example 1:
              value:
                error:
                  code: 404
                  status: 404
                  message: Path not found
  description: Retrieves usage totals for the current billing period and recent rolling windows.
  summary: Get usage summary
  security:
    - api_key:
        - ADMIN_USAGE_READ
    - user_auth:
        - viewer
        - developer
        - admin
  parameters: []
```
