GET
https://api.breeze.blue/v1/history/{history_item_id}/audioDownload history audio
Download the audio for a completed history item.
Authentication
API key: Send your Breeze Developer API key with the xi-api-key header.
Headers
| Field | Type | Description |
|---|---|---|
xi-api-keyrequired | string | Your Breeze Developer API key. See authentication. |
Path parameters
| Field | Type | Description |
|---|---|---|
history_item_idrequired | string | History item identifier returned by generation responses or GET /v1/history. |
Example request
python
from pathlib import Path
from breeze_blue import save
import os
from breeze_blue import BreezeBlue
client = BreezeBlue(api_key=os.environ["BREEZE_API_KEY"])
audio = client.history.download_audio("hist_01haudio")
save(audio, Path("history.mp3"))
typescript
import { save } from "@breeze.blue/sdk/node";
import { BreezeBlueClient } from "@breeze.blue/sdk";
const client = new BreezeBlueClient({
apiKey: process.env.BREEZE_API_KEY!,
});
const audio = await client.history.downloadAudio("hist_01haudio");
await save(audio, "history.mp3");
curl
curl "https://api.breeze.blue/v1/history/hist_01haudio/audio" \
-H "xi-api-key: $BREEZE_API_KEY"
from pathlib import Path
from breeze_blue import save
import os
from breeze_blue import BreezeBlue
client = BreezeBlue(api_key=os.environ["BREEZE_API_KEY"])
audio = client.history.download_audio("hist_01haudio")
save(audio, Path("history.mp3"))Response
Binary audio download.
Content types: audio/mpeg, audio/wav, audio/flac, audio/aac, audio/opus, audio/pcm
Response headers:
content-disposition: Suggested filename.x-breeze-api-key-id: Public API key identifier used to authenticate the request, when an API key was used.
Binary audio/mpeg, audio/wav, audio/flac, audio/aac, audio/opus, audio/pcm response bodyErrors
GENERATION_NOT_READY— The history item is still running; retry after the Retry-After interval.GENERATION_FAILED— The history item generation failed.RESOURCE_NOT_FOUND— The history audio does not exist or is no longer available.
See the full list on errors.