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

# Usage and request logs

> Track this month's API charges, check your organization's limits, and review or export the requests your API keys make.

The **Usage** tab shows how your organization uses the DeepMask API. Check what you have spent this month, see the limits that apply to all your keys, and look up individual requests in the request log. You can also export the log as a CSV file for your own reporting.

To open it, click your name at the bottom of the chat sidebar, choose **User Settings**, click **API** in the settings sidebar, then select the **Usage** tab. Only organization admins can see the **API** settings page. See [API overview](https://documentation.deepmask.io/api/overview.md) for who can use the API.

![Usage tab with the Monthly API charges card, the Gateway spending cap card with its reset date and Manage cap button, the API limits card, and the Request log table with a date range picker and Export CSV button.](https://mintcdn.com/deepmaskgmbh/Tc7tJrGOE8MSnXNJ/images/api/usage.jpg?fit=max\&auto=format\&n=Tc7tJrGOE8MSnXNJ\&q=85\&s=c87b49d6136308cd6a801123c150b9ec)

The Usage tab shows monthly charges, your spending cap, API limits, and the request log.

> [!NOTE]
>
> The **Gateway spending cap** and **API limits** cards appear after you first click **Enable API billing**. See [Billing](https://documentation.deepmask.io/api/billing.md).

## Monthly API charges

The **Monthly API charges** card shows what your organization has been charged so far in the current billing period. It shows:

* The billing period, next to the title. A period is one calendar month in UTC, from 00:00 UTC on the 1st to the end of the month.
* The amount charged so far this period. It includes the 3% fee and excludes tax, as the note "Billed monthly. Includes the 3% fee before tax." says. Your invoice adds VAT where applicable.
* The number of requests charged this period, for example "1 billed request" or "248 billed requests".

A request counts toward the month in which it started. Requests that a spending cap blocked aren't charged, so they aren't counted. Requests that haven't been charged yet don't appear in the count either.

A request with an unclear outcome, such as a server error or timeout at the model provider, or a stream that breaks off midway on DeepMask's or the provider's side, isn't charged or counted either. If usage for it still arrives later, DeepMask bills that usage like any other. Unclear outcomes don't pause your organization's requests unless it has more than 20 of them in any 24 hours. See [Unclear outcomes](https://documentation.deepmask.io/api/limits.md#unclear-outcomes).

New charges can take a few minutes to appear. The page doesn't update on its own, so click **Refresh** at the top of the page to see the latest figures.

### Requests still being checked

Sometimes the card shows a warning such as "Requests still being checked: 2. This month’s total may change." This means DeepMask is still checking the recorded usage of some of this month's requests before deciding what to charge. This happens when DeepMask can't yet verify or price that usage, for example while it confirms a model's current price, or when usage is recorded for a request that failed or was refused. The count can also include unclear outcomes over the allowance of 20 in any 24 hours. The amount and the billed request count can change once that check finishes.

> [!WARNING]
>
> While the card shows this warning, your organization's API requests are paused. Requests from all your keys return `503` with `API_ADMISSION_UNAVAILABLE` until the check finishes. A request that was already being processed returns `503` with `API_ACCOUNTING_REVIEW`. Requests can also be paused without this warning, for example when a completed request's usage arrives late, when usage doesn't match the request it belongs to, or when the usage being checked is from an earlier month. See [When requests are paused](https://documentation.deepmask.io/api/errors.md#when-requests-are-paused) for what your apps get and when to contact support.

## Gateway spending cap

The **Gateway spending cap** card shows your organization-wide cap. This cap is shared by all your API keys. Once your organization's spend passes it, DeepMask refuses further requests until the cap resets or you raise it.

The card shows:

* The cap amount, in €.
* The reset date, for example "Resets Dec 1, 2026". The cap resets monthly at 00:00 UTC on the 1st. If the date can't be loaded, the card shows "Reset date unavailable".
* The note "Applies to model costs before fees and tax." The cap counts model costs only, while **Monthly API charges** includes the 3% fee.

The card shows the cap itself, not how much of it your organization has used. To estimate your usage against the cap, see [What a cap counts](https://documentation.deepmask.io/api/spending-caps.md#what-a-cap-counts). To change the cap, click **Manage cap**. This opens the **Billing** tab with the cap field ready to edit. See [Spending caps](https://documentation.deepmask.io/api/spending-caps.md) for how the organization-wide cap and per-key caps work together.

> [!NOTE]
>
> The reset date appears in your browser's time zone. If you're west of UTC, a reset at 00:00 UTC on the 1st can show as the last day of the previous month.

## API limits

The **API limits** card shows how much traffic your organization can send. These limits are shared by all your keys. Requests above a limit are refused with a `429` error.

| Limit | What it limits |
| - | - |
| **Requests per minute** | Requests from all your keys per minute. |
| **Tokens per minute** | Tokens from all your keys per minute. A running request counts at its model's maximum size, so this also limits how many requests can run at once. See [How tokens per minute works](https://documentation.deepmask.io/api/limits.md#how-tokens-per-minute-works). |
| **Concurrent requests** | Requests from all your keys running at the same time. |

The card shows your organization's current values. You can't change them on this page. To ask for higher limits, see [Requesting higher limits](https://documentation.deepmask.io/api/limits.md#requesting-higher-limits). See [Limits and fair use](https://documentation.deepmask.io/api/limits.md) for the default values and how each limit is counted. See [429: rate and capacity limits](https://documentation.deepmask.io/api/errors.md#429-rate-and-capacity-limits) for how to handle a `429` error.

## Request log

The **Request log** lists the requests your organization's API keys have made. Use it to check whether a request succeeded, which key and model it used, and how many tokens it consumed.

### Choosing a date range

Click the date range button above the table to open the picker. Choose one of the **Quick ranges** to apply it right away. Or select a start and end day in the calendar and click **Apply**.

| Quick range | Days covered |
| - | - |
| **Last 3 days** | Today and the two days before it. This is the default. |
| **Last 7 days** | Today and the six days before it. |
| **Last 30 days** | Today and the 29 days before it. |
| **Last 2 months** | The longest range: up to 62 days, ending today. |

A range can cover up to 62 days. It must also fall within the last 62 days and end today at the latest. Otherwise, the page shows "Pick a range of up to 2 months within the last 2 months."

The days you pick are calendar days in your browser's time zone. Your chosen range stays in place when you click **Refresh**.

### Reading the log

| Column | What it shows |
| - | - |
| **Time** | When the request started, in your browser's time zone. |
| **Model** | The model's display name. A model that's no longer offered shows its API model ID. A dash (—) means no model was recorded. |
| **Key** | The name of the key that made the request. Requests from revoked keys keep their key name. A dash (—) means the key is unknown. |
| **Tokens in / out** | Input tokens and output tokens for the request. Input tokens include the tokens for any images in the request. See [How images are billed](https://documentation.deepmask.io/api/chat-completions.md#how-images-are-billed). |
| **Status** | The outcome of the request. |

The table shows 25 requests at a time. Click **Load more** at the bottom to see the next 25. If no requests match the range, the table shows "No requests in this range."

A request appears in the log shortly after it finishes. Requests that are still running, such as a long stream, don't show yet. The log doesn't update on its own. Click **Refresh** at the top of the page to load new entries.

### Status values

| Status | Meaning |
| - | - |
| **Succeeded** | The request completed. |
| **Failed** | The request returned an error. See [Errors and retries](https://documentation.deepmask.io/api/errors.md) for common causes. |
| **Blocked: key cap** | The key's own spending cap was reached, so the request was refused before any model ran. It isn't charged. |
| **Blocked: gateway cap** | The **Gateway spending cap** was reached, so the request was refused before any model ran. It isn't charged. |

If DeepMask records a different status, the log shows that status as recorded.

### Requests missing from the log

The log lists the requests DeepMask accepted for processing, including requests that failed later with an error (**Failed**). It also lists requests blocked by a spending cap (**Blocked: key cap** or **Blocked: gateway cap**). Requests that DeepMask refuses for other reasons before processing them never appear, for example:

* Requests with a missing, invalid, or revoked key.
* Requests sent while your organization can't use the API, for example when API billing isn't active, an API invoice payment failed, or requests are paused for a usage review.
* Some requests with an invalid request body, for example invalid JSON, a compressed body, an image link, or an image sent to a model without image input.
* Requests for an endpoint DeepMask doesn't offer.
* Requests for a model the key isn't allowed to use.
* Requests refused by a key's [flood guard](https://documentation.deepmask.io/api/limits.md#per-key-flood-guard), or because the key already has [too many requests or too much request data in flight](https://documentation.deepmask.io/api/limits.md#per-key-requests-in-flight). See [429: rate and capacity limits](https://documentation.deepmask.io/api/errors.md#429-rate-and-capacity-limits).
* Calls to `GET /v1/models`.

Other invalid requests do appear, as **Failed** with 0 tokens. Examples are a field the API doesn't accept, such as `response_format`, and a sampling option outside its accepted range, such as a `temperature` above 2. An image that is over a size, count, or pixel limit, or that doesn't match its media type, also appears this way. See [Sampling options](https://documentation.deepmask.io/api/chat-completions.md#sampling-options) and [Unsupported parameters](https://documentation.deepmask.io/api/chat-completions.md#unsupported-parameters) for the fields and ranges the API accepts.

To troubleshoot these requests, check the error code in the API response. See [Errors and retries](https://documentation.deepmask.io/api/errors.md).

## Exporting the request log

Click **Export CSV** to download the request log for the range shown in the table. The file contains every request in that range, not only the rows you have loaded. If your range includes today, the file includes requests up to the moment you export. It can therefore contain requests newer than the rows in the table. The button is unavailable when the table is empty.

The file is named `deepmask-api-requests-<start>_<end>.csv`, using the first and last day of your range, for example `deepmask-api-requests-2026-11-01_2026-11-07.csv`.

### CSV columns

| Column | Content |
| - | - |
| `time_utc` | When the request started, as an ISO 8601 timestamp in UTC, for example `2026-11-01T10:00:00.000Z`. |
| `key` | The name of the key that made the request. Empty if the key is unknown. |
| `model` | The API model ID, the same value you send as `model`, for example `gpt-4o`. |
| `endpoint` | The kind of API call. For chat completions, this is usually `acompletion`. |
| `status` | The raw status, usually `success`, `failure`, `blocked_key_cap`, or `blocked_gateway_cap`. These match **Succeeded**, **Failed**, **Blocked: key cap**, and **Blocked: gateway cap** in the table. Other raw values, such as `unknown`, can appear as recorded. |
| `input_tokens` | Input tokens for the request, including tokens for any images. |
| `output_tokens` | Output tokens for the request. |
| `request_id` | DeepMask's ID for the request. For a completed chat completion, it matches the `id` field of the response, so you can match rows to your own logs. Include it when you ask [support](https://documentation.deepmask.io/support/contact.md) about a specific request. |

> [!NOTE]
>
> The table shows times in your local time zone, but the CSV uses UTC. The file is UTF-8 with a byte order mark (BOM) and opens directly in spreadsheet apps. To prevent spreadsheet formulas from running, DeepMask adds a leading `'` to any cell that starts with `=`, `+`, `-`, `@`, a tab, or a carriage return.

### Export limits

* **Row limit:** One export can contain up to 50,000 requests. For a larger range, the page shows "Too many requests in this range to export. Pick a shorter range."
* **One export at a time:** Each organization can run one export at a time. If an export is already running for your organization, for example one started by another admin or in another tab, the page shows "An export is already running for this organization. Wait for it to finish."
* **Time limit:** A large export can take a few minutes. If it doesn't finish within 5 minutes, the page shows an error. Pick a shorter range and try again.
* **Interrupted downloads:** If a download fails partway, the page shows an error and no file is saved. You never get a partial file that looks complete. Export again.

The rest of the page stays usable while an export runs.

## How long request logs are kept

DeepMask keeps request logs for 60 days and deletes older entries automatically. The date picker lets you choose up to 62 days, so the oldest days of a **Last 2 months** range can be empty.

> [!TIP]
>
> Export your request log regularly if you need a longer history, for example at the start of each month.

Deleting old log entries doesn't affect billing. DeepMask keeps billing records separately, so your charges and invoices stay complete.

## Request log and billing

The request log is an operational record. It shows what happened to each request but not what it cost. Use these places for charges instead:

* **Monthly API charges** on the **Usage** tab shows this month's running total.
* **Invoices** on the **Billing** tab lists your API invoices. See [Billing](https://documentation.deepmask.io/api/billing.md).

A few differences are expected between the log, the monthly total, and your invoice:

* The log covers every recorded request, while the monthly total counts only charged requests.
* The log shows days in your time zone, while billing periods follow UTC calendar months.
* Requests from the last minutes of a month can appear on the next invoice. See [Invoice timing](https://documentation.deepmask.io/api/billing.md#invoice-timing).
* The monthly total excludes tax, while your invoice adds VAT where applicable. See [What you pay](https://documentation.deepmask.io/api/billing.md#what-you-pay).

> [!NOTE]
>
> This page covers the DeepMask API only. For token usage in DeepMask Chat, see [Token usage](https://documentation.deepmask.io/enterprise/usage-analytics.md).

## Related pages

> [card] [Spending caps](https://documentation.deepmask.io/api/spending-caps.md)
>
> Set the organization-wide cap and optional per-key caps.

> [card] [Billing](https://documentation.deepmask.io/api/billing.md)
>
> Enable API billing, read invoices, and understand how charges work.

> [card] [Limits and fair use](https://documentation.deepmask.io/api/limits.md)
>
> See the rate, token, and budget limits and how each one is counted.

> [card] [Errors and retries](https://documentation.deepmask.io/api/errors.md)
>
> Look up error codes and learn which errors to retry.

> [card] [API keys](https://documentation.deepmask.io/api/keys.md)
>
> Create, name, and revoke the keys that appear in your request log.


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