Skip to main content

Enterprise: 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/v1/enterprise/video/scene_creator' \

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

Body Attributes

ParameterDescriptionValues
keyYour unique API key used for authorization.string
promptThe input text, separated by commas.string
prompt_durationsThe duration for each prompt. The number of durations should match the number of prompts.Up to 3-4 seconds per prompt
animationsThe animation between each image. The number of animations should match 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'.'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_promptText specifying what should be excluded from the video.string
heightThe height of the video. The default is 640 pixels. Maximum is 640 pixels.integer
widthThe width of the video. The default is 640 pixels. Maximum is 640 pixels.integer
tempIndicates whether to use a temporary file for the processed video. The default is true."true" / "false"

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/v1/enterprise/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
}
}