Skip to main content
POST
/
image-to-video
Image To Video
curl --request POST \
  --url https://dream-gateway.livepeer.cloud/image-to-video \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form image='@example-file' \
  --form model_id= \
  --form height=576 \
  --form width=1024 \
  --form fps=6 \
  --form motion_bucket_id=127 \
  --form noise_aug_strength=0.02 \
  --form safety_check=true \
  --form seed=123 \
  --form num_inference_steps=25
import requests

url = "https://dream-gateway.livepeer.cloud/image-to-video"

files = { "image": ("example-file", open("example-file", "rb")) }
payload = {
    "model_id": "",
    "height": "576",
    "width": "1024",
    "fps": "6",
    "motion_bucket_id": "127",
    "noise_aug_strength": "0.02",
    "safety_check": "true",
    "seed": "123",
    "num_inference_steps": "25"
}
headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, data=payload, files=files, headers=headers)

print(response.text)
const form = new FormData();
form.append('image', '<string>');
form.append('model_id', '');
form.append('height', '576');
form.append('width', '1024');
form.append('fps', '6');
form.append('motion_bucket_id', '127');
form.append('noise_aug_strength', '0.02');
form.append('safety_check', 'true');
form.append('seed', '123');
form.append('num_inference_steps', '25');

const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

options.body = form;

fetch('https://dream-gateway.livepeer.cloud/image-to-video', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://dream-gateway.livepeer.cloud/image-to-video",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model_id\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"height\"\r\n\r\n576\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"width\"\r\n\r\n1024\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"fps\"\r\n\r\n6\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"motion_bucket_id\"\r\n\r\n127\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"noise_aug_strength\"\r\n\r\n0.02\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"safety_check\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"seed\"\r\n\r\n123\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"num_inference_steps\"\r\n\r\n25\r\n-----011000010111000001101001--",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>",
    "Content-Type: multipart/form-data"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://dream-gateway.livepeer.cloud/image-to-video"

	payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model_id\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"height\"\r\n\r\n576\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"width\"\r\n\r\n1024\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"fps\"\r\n\r\n6\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"motion_bucket_id\"\r\n\r\n127\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"noise_aug_strength\"\r\n\r\n0.02\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"safety_check\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"seed\"\r\n\r\n123\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"num_inference_steps\"\r\n\r\n25\r\n-----011000010111000001101001--")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://dream-gateway.livepeer.cloud/image-to-video")
  .header("Authorization", "Bearer <token>")
  .body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model_id\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"height\"\r\n\r\n576\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"width\"\r\n\r\n1024\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"fps\"\r\n\r\n6\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"motion_bucket_id\"\r\n\r\n127\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"noise_aug_strength\"\r\n\r\n0.02\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"safety_check\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"seed\"\r\n\r\n123\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"num_inference_steps\"\r\n\r\n25\r\n-----011000010111000001101001--")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://dream-gateway.livepeer.cloud/image-to-video")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model_id\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"height\"\r\n\r\n576\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"width\"\r\n\r\n1024\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"fps\"\r\n\r\n6\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"motion_bucket_id\"\r\n\r\n127\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"noise_aug_strength\"\r\n\r\n0.02\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"safety_check\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"seed\"\r\n\r\n123\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"num_inference_steps\"\r\n\r\n25\r\n-----011000010111000001101001--"

response = http.request(request)
puts response.read_body
{
  "frames": [
    [
      {
        "url": "<string>",
        "seed": 123,
        "nsfw": true
      }
    ]
  ]
}
{
  "detail": {
    "msg": "<string>"
  }
}
{
  "detail": {
    "msg": "<string>"
  }
}
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>"
    }
  ]
}
{
  "detail": {
    "msg": "<string>"
  }
}
The default Gateway used in this guide is the public Livepeer.cloud Gateway. It is free to use but not intended for production-ready applications. For production-ready applications, consider using the Livepeer Studio Gateway, which requires an API token. Alternatively, you can set up your own Gateway node or partner with one via the ai-video channel on Discord.
Please note that the exact parameters, default values, and responses may vary between models. For more information on model-specific parameters, please refer to the respective model documentation available in the image-to-video pipeline. Not all parameters might be available for a given model.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

multipart/form-data
image
file
required

Uploaded image to generate a video from.

model_id
string
default:""

Hugging Face model ID used for video generation.

height
integer
default:576

The height in pixels of the generated video.

width
integer
default:1024

The width in pixels of the generated video.

fps
integer
default:6

The frames per second of the generated video.

motion_bucket_id
integer
default:127

Used for conditioning the amount of motion for the generation. The higher the number the more motion will be in the video.

noise_aug_strength
number
default:0.02

Amount of noise added to the conditioning image. Higher values reduce resemblance to the conditioning image and increase motion.

safety_check
boolean
default:true

Perform a safety check to estimate if generated images could be offensive or harmful.

seed
integer

Seed for random number generation.

num_inference_steps
integer
default:25

Number of denoising steps. More steps usually lead to higher quality images but slower inference. Modulated by strength.

Response

Successful Response

Response model for video generation.

frames
Media · object[][]
required

The generated video frames.

Last modified on March 18, 2026