---
title: "Get Trail Metrics (trace counts, token usage from tracing service)"
method: GET
path: "/v1/accounts/{account_id}/trails/{trail_id}:getMetrics"
tags: ["gateway.openapi_Gateway"]
---

# Get Trail Metrics (trace counts, token usage from tracing service)

`GET /v1/accounts/{account_id}/trails/{trail_id}:getMetrics`

## Request

- Base URL: `https://api.fireworks.ai`
- URL: `https://api.fireworks.ai/v1/accounts/{account_id}/trails/{trail_id}:getMetrics`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/fw-ai-external/apis/gateway-rest-api/docs/v1/accounts/:account_id/trails/:trail_id:getMetrics/get.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `account_id` string, required
- `trail_id` string, required

## Response `200`

A successful response.

- GatewayTrailMetrics: Metrics for a trail, fetched from the tracing service.
  - `totalTraceCount` string, int64: Total number of traces collected for this trail.
  - `firstTraceTime` string, date-time: Timestamp of the first trace in this trail.
  - `lastTraceTime` string, date-time: Timestamp of the most recent trace in this trail.
  - `promptTokenCount` string, int64: Number of prompt tokens across all traces in this trail.
  - `completionTokenCount` string, int64: Number of completion tokens across all traces in this trail.
  - `totalTokenCount` string, int64: Number of total tokens across all traces in this trail.

## Changes

- **2026-10-16** `3bf245180173`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/fw-ai-external/apis/gateway-rest-api/changes/v1/accounts/:account_id/trails/:trail_id:getMetrics/get.md)

---

[API](https://skmtc.dev/fw-ai-external/apis/gateway-rest-api.md) - [All operations](https://skmtc.dev/fw-ai-external/apis/gateway-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/fw-ai-external/apis/gateway-rest-api/revisions/3bf245180173?raw)
