---
title: "Get Usage History"
method: GET
path: "/management/usage-history"
tags: ["analytics"]
---

# Get Usage History

`GET /management/usage-history`

Get request history filtered by user_id and/or organization_id.

## Query parameters

- `user_id` string, nullable — User UUID
- `organization_id` string, nullable — Organization UUID
- `from_date` string, date-time, nullable — Start datetime filter (ISO 8601)
- `to_date` string, date-time, nullable — End datetime filter (ISO 8601)
- `model` string, nullable — Filter by model name
- `status` string, nullable — Filter by outcome: 'success' or 'error'
- `page` integer — Page number (1-based)
- `page_size` integer — Items per page (max 200)

## Headers

- `authorization` string, nullable

## Response `200`

Successful Response

- UsageHistoryResponse
  - `total` integer, required
  - `page` integer, required
  - `page_size` integer, required
  - `items` RequestHistoryItem[], required
    - `id` integer, required
    - `request_id` string, required
    - `user_id` string, required
    - `organization_id` string, nullable, required
    - `model` string, required
    - `model_group` string, nullable, required
    - `funded_from` string, nullable, required
    - `charged_amount` string, nullable, required
    - `started_at` string, date-time, required
    - `completed_at` string, date-time, nullable, required
    - `duration_ms` integer, nullable, required
    - `stream` boolean, required
    - `status` string, required
    - `http_status_code` integer, nullable, required
    - `error_type` string, nullable, required
    - `error_message` string, nullable, required
    - `finish_reason` string, nullable, required
    - `prompt_tokens` integer, nullable, required
    - `completion_tokens` integer, nullable, required
    - `total_tokens` integer, nullable, required
    - `metadata` object, nullable, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/kodacode/apis/xcode-proxy-gateway.md) · [All operations](https://skmtc.dev/kodacode/apis/xcode-proxy-gateway/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/kodacode/xcode-proxy-gateway/revisions/7863886629fd/schema)
