POST
/
video
/
img2video
Generate video from image
curl --request POST \
  --url https://modelslab.com/api/v6/video/img2video \
  --header 'Content-Type: application/json' \
  --data '{
  "key": "<string>",
  "model_id": "svd",
  "init_image": "<string>",
  "prompt": "<string>",
  "negative_prompt": "<string>",
  "height": 123,
  "width": 123,
  "num_frames": 16,
  "num_inference_steps": 20,
  "min_guidance_scale": 1,
  "max_guidance_scale": 3,
  "motion_bucket_id": 127,
  "noise_aug_strength": 0.5,
  "fps": 15,
  "output_type": "mp4",
  "temp": false,
  "webhook": "<string>",
  "track_id": "<string>"
}'
{
  "status": "success",
  "generationTime": 123,
  "id": 123,
  "output": [
    "<string>"
  ],
  "proxy_links": [
    "<string>"
  ],
  "future_links": [
    "<string>"
  ],
  "meta": {},
  "eta": 123,
  "message": "<string>",
  "tip": "<string>",
  "fetch_result": "<string>"
}

Image to Video

Generate videos from images. Image to Video Example

Request

Make a POST request to below endpoint and pass the required parameters in the request body.
curl
--request POST 'https://modelslab.com/api/v6/video/img2video' \

Body

json
{
    "key":"",
    "model_id":"svd",
    "init_image": "https://imagedelivery.net/PP4qZJxMlvGLHJQBm3ErNg/e2f9cb8e-cb87-4143-dd81-a9e77e3bb800/768",
    "height":512,
    "width":512,
    "num_frames":25,
    "num_inference_steps":20,
    "min_guidance_scale":1,
    "max_guidance_scale":3,
    "motion_bucket_id":20,
    "noise_aug_strength":0.02,
    "webhook":null,
    "track_id":null
}

Body

application/json

Response

Image-to-video generation response

The response is of type object.