curl --request POST \
--url https://api.edenai.run/v3/videos \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"prompt": "<string>",
"seconds": 2,
"size": "<string>",
"seed": 1073741823,
"provider_params": {},
"webhook_receiver": "<string>",
"user_webhook_parameters": {},
"input_reference": {
"file_id": "<string>",
"image_url": "<string>"
}
}
'import requests
url = "https://api.edenai.run/v3/videos"
payload = {
"model": "<string>",
"prompt": "<string>",
"seconds": 2,
"size": "<string>",
"seed": 1073741823,
"provider_params": {},
"webhook_receiver": "<string>",
"user_webhook_parameters": {},
"input_reference": {
"file_id": "<string>",
"image_url": "<string>"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: '<string>',
prompt: '<string>',
seconds: 2,
size: '<string>',
seed: 1073741823,
provider_params: {},
webhook_receiver: '<string>',
user_webhook_parameters: {},
input_reference: {file_id: '<string>', image_url: '<string>'}
})
};
fetch('https://api.edenai.run/v3/videos', 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://api.edenai.run/v3/videos",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => '<string>',
'prompt' => '<string>',
'seconds' => 2,
'size' => '<string>',
'seed' => 1073741823,
'provider_params' => [
],
'webhook_receiver' => '<string>',
'user_webhook_parameters' => [
],
'input_reference' => [
'file_id' => '<string>',
'image_url' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.edenai.run/v3/videos"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"prompt\": \"<string>\",\n \"seconds\": 2,\n \"size\": \"<string>\",\n \"seed\": 1073741823,\n \"provider_params\": {},\n \"webhook_receiver\": \"<string>\",\n \"user_webhook_parameters\": {},\n \"input_reference\": {\n \"file_id\": \"<string>\",\n \"image_url\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.edenai.run/v3/videos")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"prompt\": \"<string>\",\n \"seconds\": 2,\n \"size\": \"<string>\",\n \"seed\": 1073741823,\n \"provider_params\": {},\n \"webhook_receiver\": \"<string>\",\n \"user_webhook_parameters\": {},\n \"input_reference\": {\n \"file_id\": \"<string>\",\n \"image_url\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.edenai.run/v3/videos")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"<string>\",\n \"prompt\": \"<string>\",\n \"seconds\": 2,\n \"size\": \"<string>\",\n \"seed\": 1073741823,\n \"provider_params\": {},\n \"webhook_receiver\": \"<string>\",\n \"user_webhook_parameters\": {},\n \"input_reference\": {\n \"file_id\": \"<string>\",\n \"image_url\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"status": "queued",
"created_at": 123,
"model": "<string>",
"provider": "<string>",
"cost": 123,
"object": "video",
"progress": 123,
"completed_at": 123,
"expires_at": 123,
"seconds": "<string>",
"size": "<string>",
"remixed_from_video_id": "<string>",
"error": {
"code": "<string>",
"message": "<string>"
}
}Create Video
Start a video generation job.
Send model as provider/model (see GET /v3/videos/models), a prompt,
and optionally seconds, size and an input_reference image. The job
runs asynchronously: poll GET /v3/videos/ until status is
completed, then download the mp4 from GET /v3/videos//content.
Accepts application/json, or multipart/form-data with the reference
image as the input_reference file part.
curl --request POST \
--url https://api.edenai.run/v3/videos \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"prompt": "<string>",
"seconds": 2,
"size": "<string>",
"seed": 1073741823,
"provider_params": {},
"webhook_receiver": "<string>",
"user_webhook_parameters": {},
"input_reference": {
"file_id": "<string>",
"image_url": "<string>"
}
}
'import requests
url = "https://api.edenai.run/v3/videos"
payload = {
"model": "<string>",
"prompt": "<string>",
"seconds": 2,
"size": "<string>",
"seed": 1073741823,
"provider_params": {},
"webhook_receiver": "<string>",
"user_webhook_parameters": {},
"input_reference": {
"file_id": "<string>",
"image_url": "<string>"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: '<string>',
prompt: '<string>',
seconds: 2,
size: '<string>',
seed: 1073741823,
provider_params: {},
webhook_receiver: '<string>',
user_webhook_parameters: {},
input_reference: {file_id: '<string>', image_url: '<string>'}
})
};
fetch('https://api.edenai.run/v3/videos', 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://api.edenai.run/v3/videos",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => '<string>',
'prompt' => '<string>',
'seconds' => 2,
'size' => '<string>',
'seed' => 1073741823,
'provider_params' => [
],
'webhook_receiver' => '<string>',
'user_webhook_parameters' => [
],
'input_reference' => [
'file_id' => '<string>',
'image_url' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.edenai.run/v3/videos"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"prompt\": \"<string>\",\n \"seconds\": 2,\n \"size\": \"<string>\",\n \"seed\": 1073741823,\n \"provider_params\": {},\n \"webhook_receiver\": \"<string>\",\n \"user_webhook_parameters\": {},\n \"input_reference\": {\n \"file_id\": \"<string>\",\n \"image_url\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.edenai.run/v3/videos")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"prompt\": \"<string>\",\n \"seconds\": 2,\n \"size\": \"<string>\",\n \"seed\": 1073741823,\n \"provider_params\": {},\n \"webhook_receiver\": \"<string>\",\n \"user_webhook_parameters\": {},\n \"input_reference\": {\n \"file_id\": \"<string>\",\n \"image_url\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.edenai.run/v3/videos")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"<string>\",\n \"prompt\": \"<string>\",\n \"seconds\": 2,\n \"size\": \"<string>\",\n \"seed\": 1073741823,\n \"provider_params\": {},\n \"webhook_receiver\": \"<string>\",\n \"user_webhook_parameters\": {},\n \"input_reference\": {\n \"file_id\": \"<string>\",\n \"image_url\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"status": "queued",
"created_at": 123,
"model": "<string>",
"provider": "<string>",
"cost": 123,
"object": "video",
"progress": 123,
"completed_at": 123,
"expires_at": 123,
"seconds": "<string>",
"size": "<string>",
"remixed_from_video_id": "<string>",
"error": {
"code": "<string>",
"message": "<string>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Request body for POST /v3/videos.
OpenAI's video creation shape (model, prompt, seconds, size,
input_reference) plus Eden extensions (seed, provider_params,
webhook_receiver, user_webhook_parameters).
Video model as provider/model, e.g. pruna/p-video or openai/sora-2. List the available ids with GET /v3/videos/models.
1Text describing the video to generate.
1Clip length in seconds. Accepts OpenAI's string form ("4", "8", "12") or an integer. Omit to use the model's default duration.
x >= 1Output resolution as WIDTHxHEIGHT, e.g. 1280x720 or 1920x1080. Omitted uses the provider's default; each provider maps it to its nearest tier.
^\d+x\d+$Eden extension: random seed for reproducible output.
0 <= x <= 2147483646Eden extension: provider-native parameters merged into the provider request, subject to the per-provider allow-list.
Eden extension: URL notified when the job finishes.
1 - 2083Eden extension: custom fields echoed in the webhook payload.
Optional reference image that seeds an image-to-video generation.
Show child attributes
Show child attributes
Response
Successful Response
A video generation job, in OpenAI's video object shape.
provider and cost are Eden extensions. Download the finished video from
GET /v3/videos/{video_id}/content.
Job id. Use it to poll, download and delete.
queued, in_progress, completed or failed.
queued, in_progress, completed, failed Unix timestamp (seconds) of job creation.
The provider/model that ran the job.
Eden extension: provider that ran the job.
Eden extension: cost in USD. 0 while the job is queued or in progress (the reserved estimate is not surfaced); the settled amount once the job completes or fails.
"video"0 while running or failed, 100 when completed.
Unix timestamp (seconds) when the job finished.
Always null: Eden AI keeps the result.
Clip length in seconds, as a string.
Requested resolution as WIDTHxHEIGHT.
Always null: remix is not supported.
Set when status is failed.
Show child attributes
Show child attributes