---
title: "List execution history"
method: GET
path: "/v1/account/history"
tags: ["Account"]
---

# List execution history

`GET /v1/account/history`

## Request

- Base URL: `https://api.sandbase.ai`
- URL: `https://api.sandbase.ai/v1/account/history`
- Auth: HTTP bearer

Lists recent execution records for the API key's organization, newest first. Input and output snapshots are included only when stored JSON can be decoded. Error messages are sanitized before they are returned.

## Query parameters

- `model` string
- `api_key_id` string
- `type` string
- `status` 'completed' | 'failure' | 'in_progress'
- `error_type` string
- `range` string
- `page` integer
- `page_size` integer
- `request_id` string
- `time_basis` 'created_at' | 'settled_at'
- `billing_scope` 'any' | 'positive' | 'token'
- `start_at` string, date-time
- `end_at` string, date-time
- `latency_sample` 'positive' | 'terminal_positive'
- `min_latency_ms` integer
- `timezone` string

## Response `200`

Paginated execution history

- AccountHistoryPage
  - `items` AccountHistoryItem[], required
    - `id` string, required: Opaque execution ID.
    - `model` string, required
    - `type` string, required
    - `execution_mode` string, required
    - `status` 'pending' | 'running' | 'completed' | 'failed' | 'timeout', required
    - `latency_ms` integer, required
    - `user_cost` string, required: USD cost serialized as an exact decimal string.
    - `prompt_tokens` integer, required
    - `completion_tokens` integer, required
    - `total_tokens` integer, required
    - `cached_tokens` integer, required
    - `cache_creation_tokens` integer, required
    - `created_at` string, date-time, required
    - `api_key_prefix` string, required
    - `error_message` string: Sanitized failure message when recorded.
    - `error_type` string
    - `completed_at` string, date-time
    - `period_settled_cost` string: Settlement cost attributed to the selected settlement window when available.
    - `input_params` unknown
    - `output_result` unknown
  - `total` integer, required
  - `page` integer, required
  - `page_size` integer, required

## Other responses

- `400`: Invalid filter or analytics window
- `401`: The API key did not resolve an organization
- `402`: API key spending limit exceeded
- `403`: API key scope does not authorize this endpoint
- `500`: History lookup failed

---

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