Speech and prompt refinement

Both operations use POST /api/v1/jobs and the normal credit ledger. Retrieve the completed job to read its output.

Generate speech

curl -X POST https://vydra.ai/api/v1/jobs \
  -H "Authorization: Bearer $VYDRA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"workflow":"generate_speech","input":{"prompt":"Every great idea starts with a little curiosity.","voice_id":"21m00Tcm4TlvDq8ikWAM"}}'

Send the script in input.prompt or input.text; text takes precedence when both are provided. The trimmed script must contain 1–10,000 characters. Billing is 40 credits per 1,000 characters, proportionally rounded up: 100 characters costs 4 credits; 101 costs 5.

voice_id defaults to Rachel (21m00Tcm4TlvDq8ikWAM). Create also offers Adam (pNInz6obpgDQGcFmaJgB) and Bella (EXAVITQu4vr4xnSDxMaL). Availability depends on the configured ElevenLabs account. A completed job returns result.audioUrl and result.text. Use the audio URL as input to a talking portrait Studio node or the lip-sync API.

Refine a prompt

curl -X POST https://vydra.ai/api/v1/jobs \
  -H "Authorization: Bearer $VYDRA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"workflow":"improve_prompt","input":{"prompt":"A white dragon over the ocean"}}'

Prompt refinement costs 3 credits per request and accepts up to 4,000 UTF-8 bytes. The completed job exposes the suggestion as result.text. It does not generate an image or video; submitting the refined prompt to a generation model is a separate charge. In Create, “Improve prompt” replaces the current prompt with the suggestion.

Read the quickstart for failure-aware polling and Studio guide to chain operations. Provider failures follow normal job refund handling. A timeout is not proof a job failed; resume polling with its saved ID.