Skip to main content

Video & audio

Video and audio use the platform-native API. These jobs take from seconds to minutes, so send them with "is_async": true and poll, or use webhooks.

Video​

Endpoint: POST /generation/v1/generate/video

curl https://api.funai.art/generation/v1/generate/video \
-H "Authorization: Bearer $FUNAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model_id": "veo3-1-fast",
"workflow": "text_to_video",
"prompt": "A drone shot of a tropical island at sunset",
"duration": 8,
"is_async": true
}'

For image-to-video, use "workflow": "image_to_video" with an image-to-video model and pass the input image as the model's reference describes.

Audio and speech​

Endpoint: POST /generation/v1/generate/audio

Text-to-speech, music and sound effects.

curl https://api.funai.art/generation/v1/generate/audio \
-H "Authorization: Bearer $FUNAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model_id": "elevenlabs-tts-multilingual-v2",
"workflow": "text_to_audio",
"prompt": "Welcome to FunAI.",
"is_async": true
}'

Voices and other model options go in custom_params. The model reference lists them for each model.

Getting the result​

  1. Submit: the response holds a job_id and "status": "PROCESSING".
  2. Poll: GET /generation/v1/jobs/{job_id}/status.
  3. Done: when status is COMPLETED, output_url points at the file.

Or subscribe to the generation.completed and generation.failed webhooks.