Api

Audio Generation API

Text-to-speech and sound-effect generation with POST /api/v1/speech and POST /api/v1/sound-effects.

Audio renders synchronously: responses usually already carry status: "success" and the result URL in data.taskUrls. The returned data.id still works with GET /api/v1/tasks/{taskId} for a uniform polling flow.

List voices

GET /api/v1/voices returns the available text-to-speech voices and the per-generation credit cost. No request body.

curl -H "Authorization: Bearer $VIDRUSH_API_KEY" \
  https://vidrush-ai.com/api/v1/voices

Each voice includes id, name, gender, accent, language, and recommended_model. Use a voice id as voice_id when creating speech.

Text to speech

POST /api/v1/speech converts text to speech with a selected voice.

FieldRequiredTypeDescription
textYesstringNon-empty text to speak
voice_idYesstringA voice id from GET /api/v1/voices
optionsNoobjectmodel_id, speed (0.25–4), stability (0–1), similarity_boost (0–1)
curl -X POST https://vidrush-ai.com/api/v1/speech \
  -H "Authorization: Bearer $VIDRUSH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Welcome to Vidrush.",
    "voice_id": "EXAVITQu4vr4xnSDxMaL",
    "options": { "speed": 1.0 }
  }'

Sound effects

POST /api/v1/sound-effects generates a sound effect from a text prompt.

FieldRequiredTypeDescription
promptYesstringNon-empty description of the sound
optionsNoobjectduration_seconds (0.5–22), prompt_influence (0–1)
curl -X POST https://vidrush-ai.com/api/v1/sound-effects \
  -H "Authorization: Bearer $VIDRUSH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "prompt": "A distant rolling thunder clap", "options": { "duration_seconds": 5 } }'

Successful response

{
  "code": 0,
  "message": "ok",
  "data": {
    "id": "task_123",
    "status": "success",
    "costCredits": 1,
    "taskUrls": ["https://.../audio.mp3"]
  }
}