curl \
--request POST \
--url "https://api.breeze.blue/v1/text-to-speech/voc_xeh3w54cqvnp" \
--header "xi-api-key: $BREEZE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"text": "I can’t believe you brought him here!",
"model_id": "breeze-tts-2",
"instructions": "Say it softly and emotionally, with a hurt, disappointed tone, as if bringing him here broke your trust.",
"voice_settings": {
"guidance_scale": 4.0
}
}'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.text_to_speech.convert(
voice_id="voc_xeh3w54cqvnp",
text="I can’t believe you brought him here!",
instructions="Say it softly and emotionally, with a hurt, disappointed tone, as if bringing him here broke your trust.",
model_id="breeze-tts-2",
voice_settings={"guidance_scale": 4.0},
)
save(audio, Path("out.mp3"))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.textToSpeech.convert(
"voc_xeh3w54cqvnp",
{
text: "I can’t believe you brought him here!",
instructions: "Say it softly and emotionally, with a hurt, disappointed tone, as if bringing him here broke your trust.",
modelId: "breeze-tts-2",
voiceSettings: { guidanceScale: 4.0 },
},
);
await save(audio, "out.mp3");"<string>"{
"generation_job_id": "<string>",
"history_item_id": "<string>",
"status": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"error": "<string>",
"ok": false,
"meta": {}
}{
"code": "<string>",
"detail": "<string>",
"error": "<string>",
"ok": false,
"meta": {}
}{
"code": "<string>",
"detail": "<string>",
"error": "<string>",
"ok": false,
"meta": {}
}{
"code": "<string>",
"detail": "<string>",
"error": "<string>",
"ok": false,
"meta": {}
}{
"code": "<string>",
"detail": "<string>",
"error": "<string>",
"ok": false,
"meta": {}
}{
"code": "<string>",
"detail": "<string>",
"error": "<string>",
"ok": false,
"meta": {}
}{
"code": "<string>",
"detail": "<string>",
"error": "<string>",
"ok": false,
"meta": {}
}{
"code": "<string>",
"detail": "<string>",
"error": "<string>",
"ok": false,
"meta": {}
}Convert text to speech
Synthesize text to audio using the given voice. For complete JSON audio and timing, use Convert with timestamps. See Speech timing for SDK and CLI examples.
curl \
--request POST \
--url "https://api.breeze.blue/v1/text-to-speech/voc_xeh3w54cqvnp" \
--header "xi-api-key: $BREEZE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"text": "I can’t believe you brought him here!",
"model_id": "breeze-tts-2",
"instructions": "Say it softly and emotionally, with a hurt, disappointed tone, as if bringing him here broke your trust.",
"voice_settings": {
"guidance_scale": 4.0
}
}'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.text_to_speech.convert(
voice_id="voc_xeh3w54cqvnp",
text="I can’t believe you brought him here!",
instructions="Say it softly and emotionally, with a hurt, disappointed tone, as if bringing him here broke your trust.",
model_id="breeze-tts-2",
voice_settings={"guidance_scale": 4.0},
)
save(audio, Path("out.mp3"))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.textToSpeech.convert(
"voc_xeh3w54cqvnp",
{
text: "I can’t believe you brought him here!",
instructions: "Say it softly and emotionally, with a hurt, disappointed tone, as if bringing him here broke your trust.",
modelId: "breeze-tts-2",
voiceSettings: { guidanceScale: 4.0 },
},
);
await save(audio, "out.mp3");"<string>"{
"generation_job_id": "<string>",
"history_item_id": "<string>",
"status": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"error": "<string>",
"ok": false,
"meta": {}
}{
"code": "<string>",
"detail": "<string>",
"error": "<string>",
"ok": false,
"meta": {}
}{
"code": "<string>",
"detail": "<string>",
"error": "<string>",
"ok": false,
"meta": {}
}{
"code": "<string>",
"detail": "<string>",
"error": "<string>",
"ok": false,
"meta": {}
}{
"code": "<string>",
"detail": "<string>",
"error": "<string>",
"ok": false,
"meta": {}
}{
"code": "<string>",
"detail": "<string>",
"error": "<string>",
"ok": false,
"meta": {}
}{
"code": "<string>",
"detail": "<string>",
"error": "<string>",
"ok": false,
"meta": {}
}{
"code": "<string>",
"detail": "<string>",
"error": "<string>",
"ok": false,
"meta": {}
}Continue building
Write instructions
Convert with timestamps
Stream text to speech
Text to speech
Authorizations
Breeze Developer API key.
Path Parameters
Voice ID to use for speech generation. See List voices.
Query Parameters
Audio encoding: mp3, wav, flac, pcm, aac, or opus. Optionally add sample rate (Hz) and bitrate (kbps), e.g. mp3_44100_128 or wav_48000. Default: mp3. See Output formats.
Response mode: sync returns audio; async returns a background job to poll. Default: sync. See Async jobs.
^(sync|async)$Body
Text to synthesize. Up to 1000 characters by default; accounts with an approved higher limit may send up to their configured limit, at most 2000 characters. See Audio tags.
1Model ID for speech generation. Selected automatically when omitted. See List models.
1 - 120ISO 639-1 two-letter language code supported by the selected model. See supported language codes.
2^[A-Za-z]{2}$Performance instructions, written in the same language as the input text. See Expressive controls, Voice instruction prompting.
Optional per-request voice settings override. See Voice settings.
Show child attributes
Show child attributes
Response
Binary audio stream. Content-Type matches the requested output_format.
The response is of type file.

