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

# Data retention, exports and the audit log

> How long TensorCost keeps your data, what you can export, and how to read and verify the audit log.

## How long data is kept

Each workspace has one retention window. A sweep runs nightly at 03:15 UTC and deletes older rows from alerts, traces, GPU readings, exports, rule and enforcement events, routing dry-runs and the audit log.

Until an admin sets a window, it follows the history your plan includes:

| Plan | Default window |
| - | - |
| Developer | 30 days |
| Scale | 396 days |
| Enterprise, and every BYOC licence | Everything is kept; the sweep deletes nothing |

Because the default follows the plan, it moves with it: upgrade from Developer to Scale and the window grows to 396 days from that night on. Rows already deleted under the old window don't come back.

Your spend ledgers are the exception: cost and AI spend records are kept for at least 25 months whatever the window says.

### Setting your own window

Admins set the window under Retention in **Settings › Configuration**. Enter a number of days and save. The card shows whether the window is yours or the plan's, along with row counts and recent sweeps, and you can run a sweep on demand.

* The window is whole days from 7 up to what your plan includes: 30 on Developer, 396 on Scale, 3,650 on Enterprise. You can keep data for less than your plan, not more.
* A window you set stays until an admin changes it. A plan change, a new licence or an upgrade of a BYOC install never overwrites it.
* **Use licence default** clears your window and hands it back to the plan.
* Shortening the window deletes older rows at the next sweep, and they can't be brought back. The card warns you before you save.
* Each change is recorded in the audit log.

If TensorCost can't read your plan on a given night, and you haven't set a window, the sweep deletes nothing that night rather than guess.

> [!NOTE]
>
> On BYOC, the sweep only runs on installs that run scheduled jobs. See [what isn't available on BYOC today](https://docs.tensorcost.com/byoc/overview.md#not-available-today).

## Exports

Open **Proof › Exports**.

| Export | Formats | Who | Notes |
| - | - | - | - |
| Cost export | CSV, NDJSON | Finance, admin | 24 hours, 7 or 30 days. Runs as a job; refresh the list and download when it is ready. |
| Usage export | CSV, NDJSON | Finance, admin | Same windows. |
| FOCUS 1.5 AI usage | CSV, JSON | Finance, admin | Last 7 or 30 days, downloaded straight away. Token meters with model identity and input and output detail, built from observed calls, not provider invoices. |
| Monthly pack | PDF, plus a zip of the data behind it | Finance, admin | Look and delivery set in **Settings › Reports**. |

FOCUS 1.1 is available through the API only. The API limits a FOCUS export to 30 days and 5 requests a minute.

### Scheduled exports

**Schedules** on the Exports tab emails a CSV of cost data or usage by model on a daily (09:00), weekly (Monday 09:00) or monthly (the 1st at 09:00) cadence, UTC by default. Large files arrive as a download link. FOCUS exports and packs can't be scheduled from this form.

Sensitive datasets such as traces with prompt text are not on this tab.

## The audit log

**Settings › Audit log** (admins only) records every admin change in order: who, what and when. Filter by person, resource type, action and time.

Each row is chained to the one before it with a SHA-256 hash, so an edit or deletion after the fact can be detected. This makes the log tamper-evident, not tamper-proof. Hashes are plain hex, so you can recheck them yourself.

Two things to know:

* Audit rows are swept at the workspace retention window, so the log only goes back that far. The compliance report says "Your audit retention is N days.", or that it keeps everything when nothing is swept.
* For an auditor, admins can download the full trail as CSV or JSON through the API (`GET /api/audit/export?format=csv|json`), with a verification column on each row. See [REST API](https://docs.tensorcost.com/developers/api.md). PDF isn't supported for this export.

The **Compliance report** card on the same page generates an interim report for the open month or quarter, and a final report once the period closes. A ready report is a PDF, a zip export and a manifest. Downloads are kept 14 days.


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