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

# Data retention

> What Chariot stores for each request, how per-workspace retention periods work, and how to fetch stored audio by generation id.

Chariot keeps two kinds of data for each request: the **content** you send and receive, and **usage metadata** about the request. By default, content is kept until it is deleted. A workspace can instead choose a **retention period**, after which its content expires.

## Content and usage metadata

| | Content | Usage metadata |
| - | - | - |
| Text to speech | Input text and generated audio | Generation id, voice, model, status, character count, credits, timestamps |
| Speech to text | Audio, transcripts, word timings, display filenames, `custom_id` values | Transcription id, status, mode, language, duration, credits, timestamps |
| Every request | | Which API key or connected app made the request |

A retention period applies to content only. Usage metadata is kept so that billing, usage reports, and history listings keep working: an expired generation still appears in history, without its text or audio.

## Retention periods

You can choose one of these periods for your workspace: **1 day**, **7 days**, or **30 days**. Content is kept until the period ends, then it expires.

Data retention is available on request, generally as part of an enterprise agreement. Contact [support@chariot.in](mailto:support@chariot.in) to make it available for your workspace. Once it is available, a workspace **owner** or **admin** turns it on and chooses the period in **Settings** > **Privacy** on the [dashboard](https://platform.chariot.in). Other members can see the setting but not change it. Privacy settings are managed in the dashboard only: API keys cannot read or change them.

### What it applies to

The retention period applies to requests made with an **API key** and to requests made by **apps you connect to your workspace** through the Chariot MCP server.

Work you do while signed in to Chariot, such as in Studio or the Playground, is kept until you delete it, whatever the retention setting.

### New requests only

The period is fixed when Chariot accepts a request. Changing the setting affects new requests only: it never shortens or extends how long existing content is kept. If you turn retention off, new requests are kept until deleted, and earlier content still expires on its original date.

## When content expires

Resources under a retention period carry a `content_expires_at` timestamp. It is the time the request was accepted plus the period. A `null` value means the content is kept until deleted.

| Resource | Field |
| - | - |
| TTS history ([`GET /v1/tts/history`](https://docs.chariot.in/api-reference/endpoint/tts-history)) | `content_expires_at` on each entry |
| TTS audio links ([`GET /v1/tts/history/{inference_id}/audio`](https://docs.chariot.in/api-reference/endpoint/tts-history-audio)) | `content_expires_at` |
| Transcriptions ([`GET /v1/asr/history`](https://docs.chariot.in/api-reference/endpoint/asr-history), [`GET /v1/asr/transcriptions/{transcription_id}`](https://docs.chariot.in/api-reference/endpoint/asr-transcription)) | `content_expires_at` |

As soon as `content_expires_at` passes, the API stops returning the content:

* **Text to speech:** `tts_input_text` is `null`, `has_audio` is `false`, and the audio endpoint returns `410`.
* **Speech to text:** `filename`, `custom_id`, `transcript_preview`, `result.text`, and `result.words` are `null`. Status, duration, and billing remain.

Chariot then deletes the stored content in the background. A recovery copy of stored files is kept for about 7 more days, then deleted permanently.

## Retention periods of 1 to 30 days

Content is available through the API until `content_expires_at`.

* **Text to speech:** history entries keep their text, and you can fetch the audio by generation id until it expires.
* **Speech to text:** transcripts and word timings stay available from the transcription detail. For a synchronous file sent with `input_audio_url`, Chariot keeps only a display filename, never the URL you sent, because signed URLs carry credentials.
* **Asynchronous batches:** results expire a period after the batch is **accepted**, not after it finishes. Fetch results before `content_expires_at`.

If Chariot cannot read your workspace's retention setting when you submit a batch, `POST /v1/asr/batches` returns `503`. Retry shortly.

## Fetch audio by generation id

Every TTS generation has an id: the `Inference-Id` header of `POST /v1/tts`, the `X-inference-id` header of `POST /v1/tts/stream`, or `inference_id` in TTS history. Keep that id, and request a short-lived link to the audio whenever you need it:

```bash cURL theme={null}
# JSON with a signed link
curl https://api.chariot.in/v1/tts/history/3f2c9a71-5b0e-4d7a-9c1e-8a4b6d2f0e13/audio \
  -H "chariotai-api-key: $CHARIOT_API_KEY"

# Or follow the redirect and save the WAV file
curl -L "https://api.chariot.in/v1/tts/history/3f2c9a71-5b0e-4d7a-9c1e-8a4b6d2f0e13/audio?redirect=true" \
  -H "chariotai-api-key: $CHARIOT_API_KEY" \
  --output speech.wav
```

```python Python theme={null}
import os
import requests

API = "https://api.chariot.in"
headers = {"chariotai-api-key": os.environ["CHARIOT_API_KEY"]}
inference_id = "3f2c9a71-5b0e-4d7a-9c1e-8a4b6d2f0e13"

link = requests.get(f"{API}/v1/tts/history/{inference_id}/audio", headers=headers)
link.raise_for_status()
audio = requests.get(link.json()["url"])  # no API key: the link is signed
audio.raise_for_status()
with open("speech.wav", "wb") as f:
    f.write(audio.content)
```

```json theme={null}
{
  "inference_id": "3f2c9a71-5b0e-4d7a-9c1e-8a4b6d2f0e13",
  "url": "https://storage.example.com/tts_audio.wav?signature=REDACTED",
  "url_expires_at": "2026-11-02T10:15:00Z",
  "content_expires_at": null
}
```

* The link works for about 15 minutes, and never past `content_expires_at`. Request a new one instead of storing it.
* Anyone with the link can download the audio until it expires. Do not log, cache, or share it.
* Audio is stored after the response finishes. A request made right after a generation can return `404` for a few seconds.
* `404` means the generation is not in your workspace or has no stored audio. `410` means its content has expired.
* You can request up to 600 links per workspace per minute. Over that, the endpoint returns `429`.

> [!WARNING]
>
> **Permanent audio URLs are being retired.** The `Audio-Url` and `X-audio-url` response headers and the `audio_file` field in TTS history can contain permanent links today. They are being retired in favor of the audio endpoint, and the retirement date will be announced by email. Store the generation id, not the URL.

## WebSocket audio and `enable_logging`

Your workspace's retention setting decides what is kept, on every endpoint. On the two TTS WebSockets (`/v1/tts/ws` and `/v1/tts/ws-multi`), `enable_logging=false` keeps a session's audio out of storage; each segment's text is still recorded in your TTS history and follows your retention setting. If you omit it, or send `true`, the retention setting decides for the audio too.

## Model training

Content from your workspace may be used to improve Chariot's models.

To turn it off, a workspace owner or admin switches off **Help improve Chariot's models** in **Settings** > **Privacy**. If your workspace does not show the setting yet, contact [support@chariot.in](mailto:support@chariot.in) and Chariot will make it available.

Content can be used only if the setting was on when the content was created and is still on. Turning it off excludes your content from then on, including content created earlier.

## What retention does not cover

* **Usage metadata**, such as ids, status, duration, credits, and timestamps. It is kept for billing and usage reporting.
* **Webhook payloads.** Transcription webhooks carry ids and a result path, not transcript text. See [Webhooks](https://docs.chariot.in/guides/speech-to-text/webhooks.md).
* **Copies you make.** Audio and transcripts you download or save are yours to manage.


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