---
title: "Get run usage statistics"
method: GET
path: "/v1/runs/usage"
tags: ["Runs"]
---

# Get run usage statistics

`GET /v1/runs/usage`

## Request

- Base URL: `https://api.lunary.ai`
- URL: `https://api.lunary.ai/v1/runs/usage`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/lunary/apis/lunary-api/docs/v1/runs/usage/get.ts> (a function with typed inputs; its response is checked against the schema)

Retrieve usage statistics for runs

## Query parameters

- `days` string, required
- `userId` string
- `daily` string

## Response `200`

Successful response

- object[]
  - `date` string
  - `name` string
  - `type` string
  - `completion_tokens` integer
  - `prompt_tokens` integer
  - `cost` number
  - `errors` integer
  - `success` integer

## Other responses

- `400`: Invalid query parameters

---

[API](https://skmtc.dev/lunary/apis/lunary-api.md) - [All operations](https://skmtc.dev/lunary/apis/lunary-api/llms.txt) - [OpenAPI document](https://skmtc.dev/lunary/apis/lunary-api/revisions/a38233713bdc?raw)
