curl --request POST \
--url https://api.recoupable.dev/api/content/video \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"prompt": "<string>",
"prompt_expansion_mode": "balanced",
"image_url": "<string>",
"end_image_url": "<string>",
"duration": 5,
"resolution": "768P",
"seed": 123,
"enable_safety_checker": true,
"sync_mode": false
}
'import requests
url = "https://api.recoupable.dev/api/content/video"
payload = {
"prompt": "<string>",
"prompt_expansion_mode": "balanced",
"image_url": "<string>",
"end_image_url": "<string>",
"duration": 5,
"resolution": "768P",
"seed": 123,
"enable_safety_checker": True,
"sync_mode": False
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
prompt: '<string>',
prompt_expansion_mode: 'balanced',
image_url: '<string>',
end_image_url: '<string>',
duration: 5,
resolution: '768P',
seed: 123,
enable_safety_checker: true,
sync_mode: false
})
};
fetch('https://api.recoupable.dev/api/content/video', 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.recoupable.dev/api/content/video",
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([
'prompt' => '<string>',
'prompt_expansion_mode' => 'balanced',
'image_url' => '<string>',
'end_image_url' => '<string>',
'duration' => 5,
'resolution' => '768P',
'seed' => 123,
'enable_safety_checker' => true,
'sync_mode' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.recoupable.dev/api/content/video"
payload := strings.NewReader("{\n \"prompt\": \"<string>\",\n \"prompt_expansion_mode\": \"balanced\",\n \"image_url\": \"<string>\",\n \"end_image_url\": \"<string>\",\n \"duration\": 5,\n \"resolution\": \"768P\",\n \"seed\": 123,\n \"enable_safety_checker\": true,\n \"sync_mode\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.recoupable.dev/api/content/video")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"<string>\",\n \"prompt_expansion_mode\": \"balanced\",\n \"image_url\": \"<string>\",\n \"end_image_url\": \"<string>\",\n \"duration\": 5,\n \"resolution\": \"768P\",\n \"seed\": 123,\n \"enable_safety_checker\": true,\n \"sync_mode\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.recoupable.dev/api/content/video")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"<string>\",\n \"prompt_expansion_mode\": \"balanced\",\n \"image_url\": \"<string>\",\n \"end_image_url\": \"<string>\",\n \"duration\": 5,\n \"resolution\": \"768P\",\n \"seed\": 123,\n \"enable_safety_checker\": true,\n \"sync_mode\": false\n}"
response = http.request(request)
puts response.read_body{
"videoUrl": "<string>"
}{
"error": "Unauthorized"
}{
"error": "Unauthorized"
}{
"error": "Unauthorized"
}{
"error": "Unauthorized"
}Generate Video
Generate a video from a text prompt, optionally animating a still image (image_url) or transitioning between two images (image_url + end_image_url).
curl --request POST \
--url https://api.recoupable.dev/api/content/video \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"prompt": "<string>",
"prompt_expansion_mode": "balanced",
"image_url": "<string>",
"end_image_url": "<string>",
"duration": 5,
"resolution": "768P",
"seed": 123,
"enable_safety_checker": true,
"sync_mode": false
}
'import requests
url = "https://api.recoupable.dev/api/content/video"
payload = {
"prompt": "<string>",
"prompt_expansion_mode": "balanced",
"image_url": "<string>",
"end_image_url": "<string>",
"duration": 5,
"resolution": "768P",
"seed": 123,
"enable_safety_checker": True,
"sync_mode": False
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
prompt: '<string>',
prompt_expansion_mode: 'balanced',
image_url: '<string>',
end_image_url: '<string>',
duration: 5,
resolution: '768P',
seed: 123,
enable_safety_checker: true,
sync_mode: false
})
};
fetch('https://api.recoupable.dev/api/content/video', 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.recoupable.dev/api/content/video",
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([
'prompt' => '<string>',
'prompt_expansion_mode' => 'balanced',
'image_url' => '<string>',
'end_image_url' => '<string>',
'duration' => 5,
'resolution' => '768P',
'seed' => 123,
'enable_safety_checker' => true,
'sync_mode' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.recoupable.dev/api/content/video"
payload := strings.NewReader("{\n \"prompt\": \"<string>\",\n \"prompt_expansion_mode\": \"balanced\",\n \"image_url\": \"<string>\",\n \"end_image_url\": \"<string>\",\n \"duration\": 5,\n \"resolution\": \"768P\",\n \"seed\": 123,\n \"enable_safety_checker\": true,\n \"sync_mode\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.recoupable.dev/api/content/video")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"<string>\",\n \"prompt_expansion_mode\": \"balanced\",\n \"image_url\": \"<string>\",\n \"end_image_url\": \"<string>\",\n \"duration\": 5,\n \"resolution\": \"768P\",\n \"seed\": 123,\n \"enable_safety_checker\": true,\n \"sync_mode\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.recoupable.dev/api/content/video")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"<string>\",\n \"prompt_expansion_mode\": \"balanced\",\n \"image_url\": \"<string>\",\n \"end_image_url\": \"<string>\",\n \"duration\": 5,\n \"resolution\": \"768P\",\n \"seed\": 123,\n \"enable_safety_checker\": true,\n \"sync_mode\": false\n}"
response = http.request(request)
puts response.read_body{
"videoUrl": "<string>"
}{
"error": "Unauthorized"
}{
"error": "Unauthorized"
}{
"error": "Unauthorized"
}{
"error": "Unauthorized"
}Authorizations
Your Recoup API key. Learn more.
Body
Video generation parameters
Text prompt for video generation
1 - 50000How much effort to spend rewriting the prompt before generation. balanced returns in about a second. quality spends up to ~30s on a richer prompt.
balanced, quality URL of the image to use as the first frame. When provided, the output aspect ratio follows this image. Generate an image first via POST /api/content/image if needed.
Optional URL of the image to use as the last frame, for first-to-last keyframe generation
Duration of the generated video, in seconds
5 <= x <= 15The native generation resolution of the video
480P, 768P Random seed. A random seed is selected when omitted.
If true, the safety checker will be enabled
Return the generated video as base64 instead of a CDN URL
Response
Video generated successfully
URL of the generated video
Was this page helpful?
