POST
https://api.breeze.blue/v1/voice-previews/{generated_voice_id}/saveSave voice preview
Save a generated preview as a private voice.
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. |
content-typerequired | string | application/json |
Path parameters
| Field | Type | Description |
|---|---|---|
generated_voice_idrequired | string | Preview ID returned by a voice preview creation endpoint. |
Request body
| Field | Type | Description |
|---|---|---|
voice_namerequired | string | Display name for the saved voice. |
voice_description | string | voice_description request field for SaveVoicePreviewRequest. |
labels | object<string> | Optional voice labels to store with the saved voice. |
Example request
python
import os
from breeze_blue import BreezeBlue
client = BreezeBlue(api_key=os.environ["BREEZE_API_KEY"])
voice = client.voices.save_preview(
generated_voice_id="gvi_01hpreview",
voice_name="Brand Narrator",
)
print(voice["voice_id"])
typescript
import { BreezeBlueClient } from "@breeze.blue/sdk";
const client = new BreezeBlueClient({
apiKey: process.env.BREEZE_API_KEY!,
});
const voice = await client.voices.savePreview({
generatedVoiceId: "gvi_01hpreview",
voiceName: "Brand Narrator",
});
console.log(voice.voiceId);
curl
curl -X POST "https://api.breeze.blue/v1/voice-previews/gvi_01hpreview/save" \
-H "xi-api-key: $BREEZE_API_KEY" \
-H "content-type: application/json" \
--data '{
"voice_name": "Brand Narrator"
}'
import os
from breeze_blue import BreezeBlue
client = BreezeBlue(api_key=os.environ["BREEZE_API_KEY"])
voice = client.voices.save_preview(
generated_voice_id="gvi_01hpreview",
voice_name="Brand Narrator",
)
print(voice["voice_id"])Response
Saved voice.
Content types: application/json
Response headers:
x-breeze-api-key-id: Public API key identifier used to authenticate the request, when an API key was used.
{
"voice_id": "voc_xeh3w54cqvnp",
"name": "Example",
"category": "string",
"voice_type": "string",
"labels": {
"example": "string"
},
"preview_url": "https://example.com/audio.mp3",
"settings": {
"guidance_scale": 1
},
"description": "Example description.",
"created_at_unix": 1
}Errors
RESOURCE_NOT_FOUND— The generated_voice_id does not exist or is not owned by the current account.FORBIDDEN— The account has no remaining saved voice slots.
See the full list on errors.