Generate > Create Text to Video
Create Text to Video
Generate a video directly from a text prompt.
Examples
curl -X POST https://api.medux.io/api/app/v1/generate/video/text_to_video \
-H 'Authorization: Bearer $MEDUX_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"aspect_ratio":"ASPECT_RATIO","clarity":"CLARITY","duration_seconds":1,"model_id":"MODEL_ID","prompt":"PROMPT","title":"Demo title"}'Media Samples
Approved examples for understanding request inputs, response shape, and official example output.
Official text-to-video generation
This example uses wan-2-6-text-to-video.
This model requires starter or higher.
Sample request
Generate a short video directly from a text prompt.
Sample response
Official example output for preview only. It is not a user Media Result.
Example output
Auth Requirements
Authentication is required via Authorization header.
Preconditions
Requires a prompt and an account plan that can use the selected model.
Requires a non-empty prompt.
Also accepts optional duration_seconds, clarity, aspect_ratio, and model_id.
Request
Body
application/jsonAuthorizationstringrequiredBearer token or API key.
Location: HEADER
aspect_ratiostringoptionalRequested output aspect ratio, for example 16:9 or 9:16.
Location: BODY
claritystringoptionalRequested output clarity, for example 720P or 1080P.
Location: BODY
duration_secondsint32optionalRequested output duration in seconds.
Location: BODY
model_idstringoptionalStable public Medux model identifier.
Location: BODY
promptstringoptionalNo description provided.
Location: BODY
titlestringoptionalNo description provided.
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.
Video / Text to Video
Generate a video from a text prompt. Default model wan-2-6-text-to-video requires Starter or higher and bills per generated video second.
Invocation Example
Generate a 5 second 720P 16:9 video from this prompt using model_id wan-2-6-text-to-video. This model requires Starter or higher.
paid_plan_required if the account is below Starter.
On this page