Voice & Music Endpoints
POST /api/v1/studio/voiceover/generate
Generate a voiceover from text using ElevenLabs text-to-speech.
Request Body
textstringrequiredText to speak (1–5000 characters).
titlestringrequiredTitle for the voiceover (1–255 characters).
voicestringVoice name (default: george). Available voices: rachelle, drew, clyde, paul, domi, dave, fin, sarah, antoni, thomas, charlie, george, emily, elli, callum, patrick, harry, liam, dorothy, josh, arnold, adam, sam.
stabilitynumberVoice stability (0–1, default: 0.5). Higher values are more consistent.
similarityBoostnumberSimilarity boost (0–1, default: 0.5). Higher values match the original voice more closely.
Example
curl -X POST https://terramind.com/api/v1/studio/voiceover/generate \
-H "Authorization: Bearer sk-tm-YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "Welcome to Terramind, the unified AI platform.",
"title": "Welcome Message",
"voice": "sarah",
"stability": 0.7
}'Response
{
"success": true,
"data": {
"url": "https://storage.googleapis.com/...",
"storagePath": "studios/.../voiceover.mp3",
"format": "mp3",
"title": "Welcome Message",
"voice": "sarah",
"model": "eleven_multilingual_v2",
"textLength": 49,
"metadata": { "stability": 0.7, "similarityBoost": 0.5 }
},
"credits": { "used": 1, "cost": 3.0, "remaining": 9997.0 }
}POST /api/v1/studio/dialogue/generate
Generate a multi-voice dialogue. Each line is spoken by a different voice and stitched into a single audio file.
Request Body
inputsarrayrequiredArray of dialogue lines. Each line has text (string) and voiceId (string — a voice name from the list above).
titlestringrequiredTitle for the dialogue (1–255 characters).
stabilitynumberVoice stability (0–1, default: 0.5).
similarityBoostnumberSimilarity boost (0–1, default: 0.5).
Example
curl -X POST https://terramind.com/api/v1/studio/dialogue/generate \
-H "Authorization: Bearer sk-tm-YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"inputs": [
{ "text": "Hey, have you tried Terramind?", "voiceId": "george" },
{ "text": "Yes! The Studio API is amazing.", "voiceId": "sarah" }
],
"title": "Product Chat"
}'Response
{
"success": true,
"data": {
"url": "https://storage.googleapis.com/...",
"storagePath": "studios/.../dialogue.mp3",
"format": "mp3",
"title": "Product Chat",
"model": "elevenlabs-dialogue",
"dialogueLines": [
{ "line": 1, "voice": "george", "text": "Hey, have you tried Terramind?" },
{ "line": 2, "voice": "sarah", "text": "Yes! The Studio API is amazing." }
],
"voicesUsed": ["george", "sarah"],
"totalLines": 2,
"totalTextLength": 60,
"metadata": { "stability": 0.5, "similarityBoost": 0.5, "chunks": 2 }
},
"credits": { "used": 1, "cost": 5.0, "remaining": 9995.0 }
}POST /api/v1/studio/music/plan
Generate a composition plan for detailed music generation. The plan can be passed to the music generate endpoint for fine-grained control.
Request Body
promptstringrequiredDescription of the desired music.
music_length_msnumberTarget duration in milliseconds.
source_composition_planobjectExisting composition plan to modify.
model_idstringModel identifier.
Example
curl -X POST https://terramind.com/api/v1/studio/music/plan \
-H "Authorization: Bearer sk-tm-YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "An upbeat electronic track with synth leads and a driving beat",
"music_length_ms": 60000
}'Response
{
"positive_global_styles": ["electronic", "upbeat", "synth-driven"],
"negative_global_styles": ["acoustic", "slow"],
"sections": [
{
"section_name": "Intro",
"positive_local_styles": ["ambient pad", "building"],
"negative_local_styles": [],
"duration_ms": 8000,
"lines": ["Soft synth pad fading in"]
},
{
"section_name": "Drop",
"positive_local_styles": ["heavy bass", "energetic"],
"negative_local_styles": ["quiet"],
"duration_ms": 16000,
"lines": ["Full energy drop with driving beat"]
}
]
}POST /api/v1/studio/music/generate
Generate music from a text prompt or a composition plan. Returns an MP3 audio file URL.
Request Body
promptstringMusic description (used when no composition plan is provided).
composition_planobjectComposition plan from the /studio/music/plan endpoint.
durationSecondsnumberDuration in seconds (default: 30).
coverPromptstringPrompt for cover art generation (full mode only).
force_instrumentalbooleanGenerate without vocals (default: false).
model_idstringModel identifier.
modestringGeneration mode: full (with cover art and lyrics) or audio-only (default: full).
Example
curl -X POST https://terramind.com/api/v1/studio/music/generate \
-H "Authorization: Bearer sk-tm-YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Chill lo-fi hip hop beat for studying",
"durationSeconds": 60,
"force_instrumental": true,
"mode": "audio-only"
}'Response
{
"success": true,
"data": {
"url": "https://storage.googleapis.com/...",
"storagePath": "studios/.../music.mp3",
"format": "mp3",
"duration": 60000,
"title": null,
"model": "elevenlabs-music"
},
"credits": { "used": 1, "cost": 10.0, "remaining": 9990.0 }
}