Skip to main content

Scene Creator Endpoint

Overview

The Scene Creator endpoint enables traveling between images through latent spaces based on text prompts.

Request

--request POST 'https://modelslab.com/api/v6/video/scene_creator' \

Make a POST request to https://modelslab.com/api/v6/video/scene_creator endpoint and pass the required parameters in the request body.

Body Attributes

ParameterDescription
keyYour API Key used for request authorization.
promptThe input text, Separated with '
prompt_durationsDuration for every image to travel through. Should be equal to the number of prompts.
animationsAnimation between every image. Should be equal to the number of prompts. Options include: 'right', 'left', 'up', 'down', 'spin_clockwise', 'spin_counterclockwise', 'zoomin', 'zoomout', 'rotate_right', 'rotate_left', 'rotate_up', 'rotate_down', 'around_right', 'around_left', 'zoomin_sinus_x', 'zoomout_sinus_y', 'right_sinus_y', 'left_sinus_y', 'flipping_phi', 'live'.
negative_promptNegative prompt.
heightDefault: 640.
widthDefault: 640.
tempIndicates whether to use a temporary file for the processed video. Default: true.

Example

Body

Body
{
"key":"",
"prompt":"a painting of a tiger with clouds in the background, a detailed painting, by Dan Mumford, unsplash, psychedelic art, a painting of a cat, iridescent smoke, casey weldon, fractal cloud | a painting of a jaguar with clouds in the background, a detailed painting, by Dan Mumford, unsplash, psychedelic art, a painting of a cat, iridescent smoke, casey weldon, fractal cloud | a painting of a deadly bear with clouds in the background, a detailed painting, by Dan Mumford, unsplash, psychedelic art, a painting of a cat, iridescent smoke, casey weldon, fractal cloud",
"prompt_durations":"1 | 1 | 1",
"animations":"around_right | live | around_left",
"negative_prompt":"low quality, bad image, cropped, out of frame",
"height":640,
"width":640,
"temp":true
}

Request

var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
"key":"",
"prompt":"a painting of a tiger with clouds in the background, a detailed painting, by Dan Mumford, unsplash, psychedelic art, a painting of a cat, iridescent smoke, casey weldon, fractal cloud | a painting of a jaguar with clouds in the background, a detailed painting, by Dan Mumford, unsplash, psychedelic art, a painting of a cat, iridescent smoke, casey weldon, fractal cloud | a painting of a deadly bear with clouds in the background, a detailed painting, by Dan Mumford, unsplash, psychedelic art, a painting of a cat, iridescent smoke, casey weldon, fractal cloud",
"prompt_durations":"1 | 1 | 1",
"animations":"around_right | live | around_left",
"negative_prompt":"low quality, bad image, cropped, out of frame",
"height":640,
"width":640,
"temp":true
});

var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};

fetch("https://modelslab.com/api/v6/video/scene_creator", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));

Response

Example Response

{
"status": "success",
"generationTime": 10.56,
"id": 148,
"output": [
"https://pub-3626123a908346a7a8be8d9295f44e26.r2.dev/generations/3d8b1b30-4e8c-41a1-935d-cac4be054ce6.mp4"
],
"proxy_links": [
"https://cdn2.stablediffusionapi.com/generations/3d8b1b30-4e8c-41a1-935d-cac4be054ce6.mp4"
],
"meta": {
"file_prefix": "3d8b1b30-4e8c-41a1-935d-cac4be054ce6",
"height": 640,
"negative_prompt": "low quality, bad image, cropped, out of frame",
"prompt": "a painting of a tiger with clouds in the background, a detailed painting, by Dan Mumford, unsplash, psychedelic art, a painting of a cat, iridescent smoke, casey weldon, fractal cloud | a painting of a jaguar with clouds in the background, a detailed painting, by Dan Mumford, unsplash, psychedelic art, a painting of a cat, iridescent smoke, casey weldon, fractal cloud | a painting of a deadly bear with clouds in the background, a detailed painting, by Dan Mumford, unsplash, psychedelic art, a painting of a cat, iridescent smoke, casey weldon, fractal cloud",
"prompt_durations": "1 | 1 | 1",
"temp": "yes",
"width": 640
}
}