POST
https://api.breeze.blue/v1/voice-previews/cloneCreate clone preview
Upload one reference sample and create a temporary voice clone preview.
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. |
Request body
| Field | Type | Description |
|---|---|---|
namerequired | string | Display name for the clone preview. |
filesrequired | array<string> | Reference audio sample. WAV or MP3, up to 5MB. Exactly one file. |
description | string | description request field for Body_add_voice_v1_voice_previews_clone_post. |
labels | string | labels request field for Body_add_voice_v1_voice_previews_clone_post. |
text | string | text request field for Body_add_voice_v1_voice_previews_clone_post. |
instructions | string | instructions request field for Body_add_voice_v1_voice_previews_clone_post. |
Example request
python
from pathlib import Path
import os
from breeze_blue import BreezeBlue
client = BreezeBlue(api_key=os.environ["BREEZE_API_KEY"])
preview = client.voices.create_clone_preview(
name="Brand Narrator",
file=Path("sample.wav"),
description="Clean studio narration sample.",
)
print(preview["generated_voice_id"])
typescript
import { readFile } from "node:fs/promises";
import { BreezeBlueClient } from "@breeze.blue/sdk";
const client = new BreezeBlueClient({
apiKey: process.env.BREEZE_API_KEY!,
});
const preview = await client.voices.createClonePreview({
name: "Brand Narrator",
file: {
data: await readFile("sample.wav"),
filename: "sample.wav",
contentType: "audio/wav",
},
description: "Clean studio narration sample.",
});
console.log(preview.generatedVoiceId);
curl
curl -X POST "https://api.breeze.blue/v1/voice-previews/clone" \
-H "xi-api-key: $BREEZE_API_KEY" \
-F "name=Brand Narrator" \
-F "files=@sample.wav" \
-F "description=Clean studio narration sample."
from pathlib import Path
import os
from breeze_blue import BreezeBlue
client = BreezeBlue(api_key=os.environ["BREEZE_API_KEY"])
preview = client.voices.create_clone_preview(
name="Brand Narrator",
file=Path("sample.wav"),
description="Clean studio narration sample.",
)
print(preview["generated_voice_id"])Response
Generated clone preview.
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.
{
"generated_voice_id": "gvi_01hpreview",
"requires_verification": false
}Errors
BAD_REQUEST— The upload format or request shape is not valid for this endpoint.VALIDATION_ERROR— The preview text or instructions exceed supported limits.GENERATION_CONCURRENCY_EXCEEDED— Your plan's concurrent generation limit was reached. Please retry shortly.VOICE_CLONE_FAILED— Voice cloning failed.UPSTREAM_GENERATION_ERROR— The generation service failed.
See the full list on errors.