---
title: "LLM cost statistics"
method: GET
path: "/v1/costs"
tags: ["System"]
---

# LLM cost statistics

`GET /v1/costs`

## Request

- Base URL: `https://api.marketintell.ai`
- URL: `https://api.marketintell.ai/v1/costs`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

Get token usage and estimated cost statistics for LLM calls.

## Response `200`

Cost breakdown by model, endpoint, and time period

- object
  - `success` boolean, required
  - `window` string: Reporting window (e.g. '24h', '7d', '30d')
  - `total_usd` number
  - `by_model` object[]
    - `model` string
    - `requests` integer
    - `input_tokens` integer
    - `output_tokens` integer
    - `usd` number
  - `by_endpoint` object[]
    - `endpoint` string
    - `requests` integer
    - `usd` number

---

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