MeduxMedux

Generate > First and Last Frame to Video

First and Last Frame to Video

Generate media with the capability-specific input contract.

POST/api/app/v1/generate/video/first_last_frame_to_video

Examples

curl -X POST https://api.medux.io/api/app/v1/generate/video/first_last_frame_to_video \
  -H 'Authorization: Bearer $MEDUX_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"aspect_ratio":"ASPECT_RATIO","clarity":"CLARITY","duration_seconds":1,"image_file_ids":["FILE_ID"],"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 image_file_ids with exactly two images in first-frame, last-frame order and a non-empty prompt.

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

No description provided.

Location: BODY

claritystringoptional

No description provided.

Location: BODY

duration_secondsint32optional

No description provided.

Location: BODY

image_file_idsarray<string>required

Exactly two images, ordered first frame then last frame.

Location: BODY

model_idstringoptional

No description provided.

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
.. 13: unauthenticated
.. 1404: provider error
.. 99: server error

Available options: 0 12 1410 1409 1401 13 1404 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 unauthenticated provider error server error

Location: RESPONSE

MCP Tool

This endpoint is also available through the Medux-hosted remote MCP service.

First and Last Frame to Video

Generate a video between exactly two image frames. Inspect the model catalog and estimate credits before submitting.

Invocation Example

Generate a video transitioning from my first image to my last image using Seedance 2.0 Mini.

medux_video_generate_first_last_frame_to_videoResult: video
model_idseedance-2-0-miniimage_file_ids["{first_frame_file_id}","{last_frame_file_id}"]prompt{prompt}

Check the selected model's input limits and account availability before submitting.