Skip to main content

Enterprise: Open Sora Endpoint

Overview

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

Request

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

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

Body Attributes

ParameterDescriptionValues
keyYour unique API key used for authorization.string
promptThe input text for video generation.string
heightThe height of the video. Default is 320 pixels. Maximum height is 768 pixels.integer
widthThe width of the video. Default is 576 pixels. Maximum width is 768 pixels.integer
fpsFrames per second. The duration of the video is calculated as the number of frames divided by the FPS. Default is 7 FPS. Maximum is 16 FPS.integer
tempIndicates whether to use a temporary file for the processed video. Default is "yes". Options: "yes" or "no"."yes"/"no"

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