---
title: "Get Agent Llm Calls"
method: GET
path: "/api/agents/{agent_id}/llm-calls"
tags: ["agent-activity"]
---

# Get Agent Llm Calls

`GET /api/agents/{agent_id}/llm-calls`

## Request

- Base URL: `https://api.maritime.sh` (the document declares no server; this is the origin it was published from)
- URL: `https://api.maritime.sh/api/agents/{agent_id}/llm-calls`
- Auth: HTTP bearer

Returns the metered LLM calls of the agent with tokens and cost, newest first.

## Path parameters

- `agent_id` string, required

## Query parameters

- `limit` integer
- `before` string, date-time, nullable: Only entries strictly older than this ISO timestamp (pagination cursor).

## Response `200`

Successful Response

- LlmCallPage
  - `calls` LlmCall[], required
    - `id` string, required
    - `timestamp` string, date-time, required
    - `model` string, required
    - `promptTokens` integer, required
    - `cachedTokens` integer, required
    - `completionTokens` integer, required
    - `reasoningTokens` integer, required
    - `costCents` number, required
    - `upstreamRequestId` string, nullable, required
  - `nextBefore` string, date-time, nullable, required

## Other responses

- `422`: Validation Error

---

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