For the complete documentation index, see llms.txt. This page is also available as Markdown.

Get Usage Records

Paginated per-request inference usage (LLM, image, video, audio) for the authenticated user.

Retrieve per-request inference usage records for the authenticated user, combining LLM, image, video, and audio calls into a single paginated list. This is the data source behind the Usage Records table on the dashboard.

HTTP Request

GET {API_URL}/user/unified_usage/requests

Query Parameters

Parameter
Type
Default
Description

page

int

1

Page number (starting at 1)

page_size

int

20

Records per page (1–100)

start_time

int

—

Start of time window as a Unix epoch (seconds)

end_time

int

—

End of time window as a Unix epoch (seconds)

model

string

—

Filter by model name (exact match, e.g. deepseek-ai/DeepSeek-V3.2)

model_type

string

all

One of all, llm, image, video, audio

api_key

string

—

Filter by API key token. When set, only LLM and Audio records are returned.

order_by

string

timestamp

Sort field — timestamp or spend

order_desc

bool

true

Sort descending when true

target_user_email

string

—

Admin only — query another user by email

Response

{
  "data": [
    {
      "request_id": "req_01HXY…",
      "timestamp": "2026-04-21T18:37:21Z",
      "model": "deepseek-ai/DeepSeek-V3.1",
      "model_type": "llm",
      "prompt_tokens": 7,
      "completion_tokens": 1,
      "total_tokens": 8,
      "spend": 0.000002
    },
    {
      "request_id": "req_01HXY…",
      "timestamp": "2026-04-21T18:37:02Z",
      "model": "MiniMaxAI/MiniMax-M2.1",
      "model_type": "llm",
      "prompt_tokens": 39,
      "completion_tokens": 1,
      "total_tokens": 40,
      "spend": 0.000012
    }
  ],
  "pagination": {
    "total_records": 50553,
    "total_pages": 2528,
    "current_page": 1,
    "page_size": 20
  },
  "message": "Unified usage records retrieved successfully",
  "status": "success"
}

Fields

  • request_id — unique identifier for the call

  • timestamp — request time (ISO 8601)

  • model — canonical model name

  • model_type — one of llm, image, video, audio

  • prompt_tokens / completion_tokens / total_tokens — LLM-only; null for image/video/audio

  • spend — cost in USD (fractions supported down to 1e-6)

Example

Request

Filter by time window

Filter by model

Last updated