MeduxMedux

Generate > Text to Video

Text to Video

Generate a video directly from a text prompt.

POST/api/app/v1/generate/video/text_to_video

Examples

curl -X POST https://medux-server-api-dev.lingverse.co/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"}'

Auth Requirements

Authentication is required via Authorization header.

Preconditions

Choose an available model and enter a prompt.

Provide a non-empty prompt. Reference files are not accepted.

Read generation_options from the model catalog; only listed parameter values are accepted.

Use clarity for output resolution. Estimate credits with the same parameters before submission.

Request

Body

application/json
Authorizationstringrequired

Bearer token or API key.

Location: HEADER

aspect_ratiostringoptional

Requested output aspect ratio, for example 16:9 or 9:16.

Location: BODY

claritystringoptional

Requested output clarity, for example 720P or 1080P.

Location: BODY

duration_secondsint32optional

Requested output duration in seconds.

Location: BODY

model_idstringoptional

Stable public Medux model identifier.

Location: BODY

promptstringrequired

No description provided.

Location: BODY

titlestringoptional

No description provided.

Location: BODY

Response

Response

application/json
codeint32optional

response 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.assetobjectoptional

No description provided.

Location: RESPONSE

data.paid_plan_requiredobjectoptional

No description provided.

Location: RESPONSE

data.taskobjectoptional

No description provided.

Location: RESPONSE

messagestringoptional

No 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 to Video

Generate a video from a non-empty prompt without reference files. Inspect the model catalog and estimate credits before submitting.

Invocation Example

Generate a 5 second 720P 16:9 video from this prompt using model_id seedance-2-0-mini. This model requires Starter or higher.

medux_video_generate_text_to_videoResult: video
prompt{prompt}model_idseedance-2-0-miniduration_seconds5

paid_plan_required if the account is below Starter.