---
title: "Get batch analytics"
method: GET
path: "/batches/{batch_id}/analytics"
tags: ["api::handlers::batches"]
---

# Get batch analytics

`GET /batches/{batch_id}/analytics`

Retrieve aggregated metrics for a batch including token usage, costs, and latency statistics.

Analytics update in real-time as requests complete.

## Path parameters

- `batch_id` string, required

## Response `200`

Batch analytics with token counts, costs, and performance metrics.

- BatchAnalytics — Aggregated analytics metrics for batch requests
  - `avg_duration_ms` number, double, nullable — Average request duration in milliseconds
  - `avg_ttfb_ms` number, double, nullable — Average time to first byte in milliseconds
  - `total_completion_tokens` integer, required — Total completion tokens across all requests
  - `total_cost` string, nullable — Total BILLED cost in credits (if pricing is available) — what the batch actually cost after prompt-cache discounts, matching the credits ledger / transactions page. (Until 2026-07 this field erroneously reported the un-discounted list price; see `total_list_cost` for that figure.)
  - `total_list_cost` string, nullable — Un-discounted list price of the same requests (no prompt-cache discounts applied). `total_list_cost - total_cost` = what caching saved on this batch. Additive field — clients that don't know it simply ignore it.
  - `total_prompt_tokens` integer, required — Total prompt tokens across all requests
  - `total_reasoning_tokens` integer, nullable — Total reasoning tokens across all requests
  - `total_requests` integer, required — Total number of requests with analytics data
  - `total_tokens` integer, required — Total tokens (prompt + completion) across all requests

## Other responses

- `404` — Batch not found or you don't have access to it.
- `500` — An unexpected error occurred. Retry the request or contact support if the issue persists.

---

[API](https://skmtc.dev/doubleword/apis/doubleword-api.md) · [All operations](https://skmtc.dev/doubleword/apis/doubleword-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/doubleword/doubleword-api/revisions/6617202865d8/schema)
