> For AI agents: the documentation index is at https://platform.detectif.ai/llms.txt. Every page is also available as Markdown by adding `.md` to its path.

# List your usage

`GET /v1/usage`

Lists your detection, enrollment and verification requests with their outcome and the credits they used, newest first. Filter by `operation` or `status`; page with `limit` and `cursor`. Requires scope `usage:read`.

## Authentication

Send your API key as `Authorization: Bearer <your API key>`.

## Headers

| Name | Type | Required | Description |
|---|---|---|---|
| `Authorization` | string | yes | `Bearer <your API key>`. Keys are created in the dashboard; see [Authentication](https://platform.detectif.ai/docs/authentication/). |

## Query parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `limit` | integer | no | How many entries to return (1-100). (1 to 100; default `20`) |
| `cursor` | string or null | no | `next_cursor` from the previous page. (at most 256 characters) |
| `operation` | string or null | no | Only this kind of request. |
| `status` | string or null | no | Only requests with this outcome. |

## Response

`200`: Success.

| Field | Type | Required | Description |
|---|---|---|---|
| `request_id` | string | yes |  |
| `object` | string | yes | (always `"list"`) |
| `data` | array of object | yes |  |
| `data.id` | string | yes |  |
| `data.operation_id` | string or null | yes |  |
| `data.type` | string | yes | (one of `deepfake.detect`, `speaker.enroll`, `speaker.verify`) |
| `data.source` | string | yes | (one of `api`, `dashboard`, `mcp`) |
| `data.status` | string | yes | (one of `succeeded`, `rejected`, `failed`, `replayed`) |
| `data.http_status` | integer | yes |  |
| `data.error_code` | string or null | yes |  |
| `data.credits_charged` | integer | yes |  |
| `data.duration_seconds` | number or null | yes |  |
| `data.latency_ms` | number or null | yes |  |
| `data.request_id` | string | yes |  |
| `data.created_at` | string | yes |  |
| `has_more` | boolean | yes |  |
| `next_cursor` | string or null | yes |  |

### Example response

```json
{
  "request_id": "req_8f14e45fceea167a5a36dedd",
  "object": "list",
  "data": [
    {
      "id": "use_812",
      "operation_id": "op_6f1ed002ab5595859014ebf0951522d9",
      "type": "deepfake.detect",
      "source": "api",
      "status": "succeeded",
      "http_status": 200,
      "duration_seconds": 6.4,
      "request_id": "req_8f14e45fceea167a5a36dedd",
      "created_at": "2026-10-13T09:30:00Z"
    }
  ],
  "has_more": true,
  "next_cursor": "eyJ0IjoiMjAyNi0xMC0xM1QwOTozMDowMFoiLCJpIjo4MTJ9"
}
```

## Errors

| Status | Meaning |
|---|---|
| `400` | The request is invalid, for example a missing or malformed field. |
| `401` | The API key is missing, invalid or revoked. |
| `403` | The key lacks the required scope, the email address is not verified, or the account is suspended. |
| `429` | Too many requests or too many operations at the same time. Wait for the number of seconds in Retry-After. |
| `500` | Something went wrong on our side. No credits were used. |

Error bodies use the shape described in [Errors](https://platform.detectif.ai/docs/errors/), with a stable `error.code`.

## Code samples

```bash
curl "https://platform.detectif.ai/v1/usage" \
  -H "Authorization: Bearer $DETECTIF_API_KEY"
```

```python
import os

import requests

resp = requests.get(
    "https://platform.detectif.ai/v1/usage",
    headers={"Authorization": f"Bearer {os.environ['DETECTIF_API_KEY']}"},
    timeout=30,
)
print(resp.status_code, resp.json())
```

```javascript
const res = await fetch("https://platform.detectif.ai/v1/usage", {
  headers: {
    Authorization: `Bearer ${process.env.DETECTIF_API_KEY}`,
  },
});
console.log(res.status, await res.json());
```
