> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nemu.cc/llms.txt
> Use this file to discover all available pages before exploring further.

# Metrics

> Read per request usage metrics for your account

Metrics record one row per request, with timing, tokens, and cost. They belong to your
account. Reading needs `usage:read`.

## List metrics

```
GET /api/v1/metrics
```

Results are paginated.

<ParamField query="page" type="integer" default="1">
  The page to return.
</ParamField>

<ParamField query="limit" type="integer" default="10">
  Rows per page.
</ParamField>

<ParamField query="key_id" type="string">
  Filter to a single key.
</ParamField>

<ParamField query="start_date" type="string">
  Only include rows on or after this ISO 8601 date.
</ParamField>

<ParamField query="end_date" type="string">
  Only include rows on or before this ISO 8601 date.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl 'https://platform.nemu.cc/api/v1/metrics?page=1&limit=20' \
    -H 'Authorization: Bearer <access_token>'
  ```

  ```ts SDK theme={null}
  const metrics = await nemu.metrics.list({ page: 1, limit: 20 });
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "data": [
      {
        "id": "met_1",
        "user_id": "3f0e...",
        "key_id": "key_1",
        "method": "POST",
        "endpoint": "/v1/chat/completions",
        "status_code": 200,
        "duration_ms": 812,
        "tokens_input": 120,
        "tokens_output": 340,
        "cost": 0.0021,
        "provider_id": "prov_1",
        "model_id": "mdl_1",
        "created_at": "2026-01-04T10:22:00.000Z"
      }
    ],
    "total": 1,
    "page": 1,
    "limit": 20,
    "total_pages": 1
  }
  ```
</ResponseExample>

## Get a metric

```
GET /api/v1/metrics/{id}
```

## Delete a metric

```
DELETE /api/v1/metrics/{id}
```
