Skip to main content
Install the SDK, create a Developer Console API key, and synthesize your first audio in under a minute.

1. Create an API key

Open the API keys page, select Create API key, name it, and copy the secret once. Treat BREEZE_API_KEY like a password.

2. Install the SDK

Python:
# uv
uv add breeze-blue

# pip
pip install breeze-blue
TypeScript:
# pnpm
pnpm add @breeze.blue/sdk

# npm
npm install @breeze.blue/sdk

# yarn
yarn add @breeze.blue/sdk

3. Set environment variables

export BREEZE_API_KEY="brz_..."

4. Convert text to speech

Python uses snake_case. TypeScript uses camelCase.
import os
from pathlib import Path

from breeze_blue import BreezeBlue, play, save

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

audio = client.text_to_speech.convert(
    voice_id="voc_xeh3w54cqvnp",
    text="Hello from Breeze. Your SDK is ready.",
    output_format="mp3",
)

play(audio)
save(audio, Path("hello.mp3"))
import { BreezeBlueClient } from "@breeze.blue/sdk";
import { play, save } from "@breeze.blue/sdk/node";

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

const audio = await client.textToSpeech.convert(
  "voc_xeh3w54cqvnp",
  { text: "Hello from Breeze. Your SDK is ready." },
  { outputFormat: "mp3" },
);

await play(audio);
await save(audio, "hello.mp3");

5. Stream audio

Use streaming when playback should begin before the full response has been generated.
import os

from breeze_blue import BreezeBlue, stream

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

audio_stream = client.text_to_speech.stream(
    voice_id="voc_xeh3w54cqvnp",
    text="Streaming starts as soon as audio is available.",
    output_format="mp3",
)

stream(audio_stream)
import { BreezeBlueClient } from "@breeze.blue/sdk";
import { stream } from "@breeze.blue/sdk/node";

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

const audioStream = await client.textToSpeech.stream(
  "voc_xeh3w54cqvnp",
  { text: "Streaming starts as soon as audio is available." },
  { outputFormat: "mp3" },
);

await stream(audioStream);

6. List voices and history

Use voices to choose saved or public voices, and history to inspect previous text-to-speech generations.
import os

from breeze_blue import BreezeBlue

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

voices = client.voices.search()
first_voice = voices["voices"][0]

items = client.history.list()
latest = items["history"][0]

print(first_voice["voice_id"], first_voice["name"])
print(latest["history_item_id"], latest["text"])
import { BreezeBlueClient } from "@breeze.blue/sdk";

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

const voices = await client.voices.search();
const firstVoice = voices.voices[0];

const items = await client.history.list();
const latest = items.history[0];

console.log(firstVoice.voiceId, firstVoice.name);
console.log(latest.historyItemId, latest.text);

7. Inspect the request

The logs page shows the call with status, latency, audio download, and Copy as cURL.

Next steps

Text to speech guide

Add batching, async jobs, expressive instructions, and per-call voice settings.

Streaming

Start playback before the full response has been generated.

Output formats

Choose MP3, WAV, FLAC, PCM, AAC, or Opus for your playback and pipeline needs.

Rate limits

Plan retries, async jobs, and concurrency around Breeze generation limits.