Skip to main content

Open Sora Endpoint

Overview

The Open Sora endpoint generate captivating video by passing in text prompt

Request

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

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

Body Attributes

ParameterDescription
keyYour API Key used for request authorization.
promptThe prompt
heightdefault is 320 Max height: 768.
widthdefault is 576 Max width: 768.
fpsframes per sec - [duration of video = num_frames/fps] - default=7
tempIndicates whether to use a temporary file for the processed video. Default: yes.

Example

Body

Body
{
"key":"",
"prompt":"a dog playing cards",
"height":"256",
"width":256,
"num_frames": 25,
"fps":12,
"webhook":null,
"track_id": null
}

Request

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

var raw = JSON.stringify({
"key":"",
"prompt":"a dog playing cards",
"height": 256,
"width":256,
"num_frames": 25,
"fps":12,
"webhook":null,
"track_id": null
});

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

fetch("https://modelslab.com/api/v6/video/open_sora", 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/8d299336-e805-4e75-bc0e-02fe03f87edf.mp4"
],
"proxy_links": [
"https://cdn2.stablediffusionapi.com/generations/8d299336-e805-4e75-bc0e-02fe03f87edf.mp4"
],
"meta": {
"ar": 25,
"batch_size": 1,
"file_prefix": "8d299336-e805-4e75-bc0e-02fe03f87edf",
"fps": 12,
"frame_interval": 3,
"height": 256,
"num_frames": 25,
"output_type": "mp4",
"prompt": null,
"seed": 1902962721,
"temp": "no",
"width": 256
}
}