SDK quickstart

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

Start building with Breeze

Create an API key and call /v1/* in minutes.

Get API key

1. Create a Developer Console API key

Open the API keys page, click Create API key, name it (e.g. local-dev), and copy the secret once. Treat BREEZE_API_KEY like a password.

2. Install the SDK

Pick the package that matches your stack.

Python bash # uv (recommended) uv add breeze-blue # or pip pip install breeze-blue TypeScript bash # pnpm pnpm add @breeze.blue/sdk # npm npm install @breeze.blue/sdk # yarn yarn add @breeze.blue/sdk
# uv (recommended)
uv add breeze-blue

# or pip
pip install breeze-blue

3. Set environment variables

bash export BREEZE_API_KEY="brz_..."
export BREEZE_API_KEY="brz_..."

4. Convert text to speech

Python uses snake_case (text_to_speech.convert); TypeScript uses camelCase (textToSpeech.convert). This example converts text to MP3, plays it, and saves a local copy.

python 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")) typescript 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");
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"))

5. Stream audio

Use streaming when you want playback to begin before the full response has been generated.

python 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) typescript 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);
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)

6. List voices and history

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

python 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"]) typescript 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);
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"])

7. Inspect the request

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

Next steps