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

> ## Agent Instructions
> Setting up Context.dev for a user? Follow https://docs.context.dev/agent-quickstart.md. Start by signing the user up and getting an API key through https://www.context.dev/auth.md; application code reads CONTEXT_DEV_API_KEY.

# Usage and request logs

> Label requests and investigate their metadata, input, and results.

Use `tags` to group requests by environment, workflow, or customer account identifier. Keep secrets and personal data out of labels.

## Tag requests

For JSON endpoints, add:

```json theme={null}
{"tags":["production","site-import"]}
```

GET endpoints accept comma-separated `tags`, such as `production,site-import`. A request accepts up to 20 tags, each 1–50 characters. ZDR requests omit tags from retained logs.

## Inspect usage

The dashboard usage page filters charts and request logs together by key and tags. Monitors have persistent tags that label their runs and changes; request tags label a single API call.

## Check credits and usage history

[Retrieve credit usage](/api-reference/usage/retrieve) returns your balance, credits used in the current period, and when credits next refill. [Retrieve usage history](/api-reference/usage/history) returns credits and requests by hour, day, or month, optionally split by `path`, `key_id`, or `status_code`. Both need `logs:read` and cost no credits.

## Read request logs

Use [List request logs](/api-reference/logs/list) with `logs:read`, then [Retrieve a request log](/api-reference/logs/retrieve) for retained input and response content. Available filters include key, route, status, time, and tags; the reference lists query syntax and pagination.

Entries include HTTP requests and synthetic `MONITOR` and `BATCH` rows for runs and settlements. Their `method` is not always an HTTP verb, and their `key_id` can be null.

Logs are kept for up to one year. Retained input and response fields redact recognized credentials; redaction does not remove every kind of sensitive content. [ZDR](/optimization/zero-data-retention) retains operational metadata only.

Save `request_id` with application errors so you can match them to the API logs and support reports.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.