Video > Text & Image to Video
Text & Image to Video
Generate a video and audio from a text prompt with optional image, last-frame, and audio references.
Examples
curl -X POST https://api.medux.io/api/app/v1/generate/video/text_image_to_video \
-H 'Authorization: Bearer $MEDUX_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"height":832,"model_id":"text-image-to-video-default","num_frames":124,"num_inference_steps":9,"prompt_text":"Hello from Medux","resolution":"480p","seed":-1,"width":480}'Auth Requirements
Authentication is required via Authorization header.
Preconditions
Upload the source file and create a file reference before calling this endpoint.
Successful requests return a Medux task record immediately. Use the task query or sync endpoints to track completion.
All file inputs must be uploaded and persisted as file references before submission.
Request
Body
application/jsonAuthorizationstringrequiredBearer token or API key.
Location: HEADER
prompt_textstringrequiredPrompt text used to generate the video and audio.
Location: BODY
prompt_image_file_idstringoptionalOptional reference image file_id.
Location: BODY
last_image_file_idstringoptionalOptional last-frame image file_id.
Location: BODY
prompt_audio_file_idstringoptionalOptional driving audio file_id. When set, generated video follows this audio.
Location: BODY
resolutionstringoptionalTarget output resolution preset. Default: 480p.
Location: BODY
num_framesintegeroptionalNumber of generated video frames when prompt audio is not set. Default: 124.
Location: BODY
num_inference_stepsintegeroptionalNumber of diffusion inference steps. Default: 9.
Location: BODY
seedintegeroptionalRandom seed. Use -1 to let the pipeline choose one. Default: -1.
Location: BODY
heightintegeroptionalOptional explicit output height. Default: 832.
Location: BODY
widthintegeroptionalOptional explicit output width. Default: 480.
Location: BODY
model_idstringoptionalText and image to video model id. Default: text-image-to-video-default.
Location: BODY
titlestringoptionalOptional task title.
Location: BODY
Response
Response
application/jsoncodeint32optionalresponse code enums:
.. 0: ok
.. 12: invalid input
.. 1410: invalid model
.. 1409: paid plan required
.. 1401: insufficient credits
.... 1401 ~ 1499 是 media
.. 1404: provider error
.. 1405: provider timeout
.. 13: unauthenticated
.. 16: rate limit
.. 99: server error
Available options: 0 12 1410 1409 1401 1404 1405 13 16 99
Location: RESPONSE
data.assetobjectoptionalNo description provided.
Location: RESPONSE
data.paid_plan_requiredobjectoptionalNo description provided.
Location: RESPONSE
data.taskobjectoptionalNo description provided.
Location: RESPONSE
messagestringoptionalNo description provided.
Available options: ok invalid input invalid model paid plan required insufficient credits provider error provider timeout unauthenticated rate limit server error
Location: RESPONSE
MCP Tool
This endpoint is also available through the Medux-hosted remote MCP service.
Text & Image to Video
Generate a video and audio from a text prompt with optional image, last-frame, and audio references.
Invocation Example
Generate a video and audio from a text prompt with optional image, last-frame, and audio references.
On this page