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

# Managing history

> List, replay, and delete past text-to-speech requests.

Successful text-to-speech requests are recorded in history with input text, voice, status, timestamp, and audio. Async text-to-speech jobs use the same id for `generation_job_id` and `history_item_id`, so they appear in history while they move from active to ready or failed.

## Listing recent requests

```python theme={null}
import os

from breeze_blue import BreezeBlue

client = BreezeBlue(api_key=os.environ["BREEZE_API_KEY"])

items = client.history.list()
for item in items["history"]:
    print(item["history_item_id"], item["text"])
```

```typescript theme={null}
import { BreezeBlueClient } from "@breeze.blue/sdk";

const client = new BreezeBlueClient({
  apiKey: process.env.BREEZE_API_KEY!,
});

const items = await client.history.list();
for (const item of items.history) {
  console.log(item.historyItemId, item.text);
}
```

```bash theme={null}
curl https://api.breeze.blue/v1/history \
  -H "xi-api-key: $BREEZE_API_KEY"
```

## Downloading audio

Pull the original audio for a recorded request and save it locally. The [logs page](https://breezeblue.ai/app/developer/logs) also offers inline playback and a direct download link. For async jobs, use the generation jobs audio endpoint. Active jobs return `GENERATION_NOT_READY` with `Retry-After`.

```python theme={null}
import os
from pathlib import Path

from breeze_blue import BreezeBlue, save

client = BreezeBlue(api_key=os.environ["BREEZE_API_KEY"])

audio = client.history.download_audio(
    history_item_id="hist_01haudio",
)
save(audio, Path("history.mp3"))

async_audio = client.generation_jobs.download_audio("job_01hasync")
save(async_audio, Path("async.mp3"))
```

```typescript theme={null}
import { BreezeBlueClient } from "@breeze.blue/sdk";
import { save } from "@breeze.blue/sdk/node";

const client = new BreezeBlueClient({
  apiKey: process.env.BREEZE_API_KEY!,
});

const audio = await client.history.downloadAudio("hist_01haudio");
await save(audio, "history.mp3");

const asyncAudio = await client.generationJobs.downloadAudio("job_01hasync");
await save(asyncAudio, "async.mp3");
```

```bash theme={null}
curl https://api.breeze.blue/v1/history/$HISTORY_ITEM_ID/audio \
  -H "xi-api-key: $BREEZE_API_KEY" \
  --output history.mp3

curl https://api.breeze.blue/v1/generation-jobs/$GENERATION_JOB_ID/audio \
  -H "xi-api-key: $BREEZE_API_KEY" \
  --output async.mp3
```

## Deleting items

Purge test runs before sharing logs, or clean up old generations. The SDK exposes `history.delete`; the HTTP equivalent is `DELETE /v1/history/{history_item_id}`.

```python theme={null}
import os

from breeze_blue import BreezeBlue

client = BreezeBlue(api_key=os.environ["BREEZE_API_KEY"])

client.history.delete("hist_01haudio")
```

```typescript theme={null}
import { BreezeBlueClient } from "@breeze.blue/sdk";

const client = new BreezeBlueClient({
  apiKey: process.env.BREEZE_API_KEY!,
});

await client.history.delete("hist_01haudio");
```

```bash theme={null}
curl -X DELETE https://api.breeze.blue/v1/history/$HISTORY_ITEM_ID \
  -H "xi-api-key: $BREEZE_API_KEY"
```

## Related workflows

<Columns cols={2}>
  <Card title="Text to speech" icon="mic" href="/guides/text-to-speech">
    Generate the sync, async, and streaming requests that appear in history.
  </Card>

  <Card title="API reference" icon="braces" href="/api-reference/introduction">
    Inspect history, generation job, and audio download endpoints.
  </Card>

  <Card title="Developer logs" icon="activity" href="https://breezeblue.ai/app/developer/logs">
    Review request status, latency, playback, downloads, and Copy as cURL.
  </Card>

  <Card title="Errors" icon="triangle-alert" href="/reference/errors">
    Handle not-ready jobs, missing history items, auth failures, and transient generation errors.
  </Card>
</Columns>
