Generate one clip
curl --request POST \
--url https://lavendly.ai/api/v1/videos \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "google/veo-3.1-lite",
"prompt": "Aerial drone shot of a red motorcycle on a dune, golden hour",
"duration": 6,
"aspect_ratio": "16:9"
}
'import requests
url = "https://lavendly.ai/api/v1/videos"
payload = {
"model": "google/veo-3.1-lite",
"prompt": "Aerial drone shot of a red motorcycle on a dune, golden hour",
"duration": 6,
"aspect_ratio": "16:9"
}
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: 'google/veo-3.1-lite',
prompt: 'Aerial drone shot of a red motorcycle on a dune, golden hour',
duration: 6,
aspect_ratio: '16:9'
})
};
fetch('https://lavendly.ai/api/v1/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://lavendly.ai/api/v1/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' => 'google/veo-3.1-lite',
'prompt' => 'Aerial drone shot of a red motorcycle on a dune, golden hour',
'duration' => 6,
'aspect_ratio' => '16:9'
]),
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://lavendly.ai/api/v1/videos"
payload := strings.NewReader("{\n \"model\": \"google/veo-3.1-lite\",\n \"prompt\": \"Aerial drone shot of a red motorcycle on a dune, golden hour\",\n \"duration\": 6,\n \"aspect_ratio\": \"16:9\"\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://lavendly.ai/api/v1/videos")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"google/veo-3.1-lite\",\n \"prompt\": \"Aerial drone shot of a red motorcycle on a dune, golden hour\",\n \"duration\": 6,\n \"aspect_ratio\": \"16:9\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://lavendly.ai/api/v1/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\": \"google/veo-3.1-lite\",\n \"prompt\": \"Aerial drone shot of a red motorcycle on a dune, golden hour\",\n \"duration\": 6,\n \"aspect_ratio\": \"16:9\"\n}"
response = http.request(request)
puts response.read_body{
"id": "JOB_ID",
"status": "pending"
}{
"error": {
"code": "invalid_args",
"message": "..."
}
}{
"error": {
"code": "unauthenticated",
"message": "..."
}
}{
"error": {
"code": "insufficient_credits",
"message": "..."
}
}{
"error": {
"code": "viewer_read_only",
"message": "..."
}
}{
"error": {
"code": "rate_limited",
"message": "Rate limit exceeded for mutation requests. Retry in ~12s.",
"retry_after_ms": 11480,
"limit": 20,
"window_seconds": 60,
"class": "mutation"
}
}Single clips
Generate one clip
Charges credits. Durations and aspects are fixed per model (google/veo-3.1-lite: 4, 6, 8 s). Poll GET /v1/videos/, then download /content.
POST
/
v1
/
videos
Generate one clip
curl --request POST \
--url https://lavendly.ai/api/v1/videos \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "google/veo-3.1-lite",
"prompt": "Aerial drone shot of a red motorcycle on a dune, golden hour",
"duration": 6,
"aspect_ratio": "16:9"
}
'import requests
url = "https://lavendly.ai/api/v1/videos"
payload = {
"model": "google/veo-3.1-lite",
"prompt": "Aerial drone shot of a red motorcycle on a dune, golden hour",
"duration": 6,
"aspect_ratio": "16:9"
}
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: 'google/veo-3.1-lite',
prompt: 'Aerial drone shot of a red motorcycle on a dune, golden hour',
duration: 6,
aspect_ratio: '16:9'
})
};
fetch('https://lavendly.ai/api/v1/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://lavendly.ai/api/v1/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' => 'google/veo-3.1-lite',
'prompt' => 'Aerial drone shot of a red motorcycle on a dune, golden hour',
'duration' => 6,
'aspect_ratio' => '16:9'
]),
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://lavendly.ai/api/v1/videos"
payload := strings.NewReader("{\n \"model\": \"google/veo-3.1-lite\",\n \"prompt\": \"Aerial drone shot of a red motorcycle on a dune, golden hour\",\n \"duration\": 6,\n \"aspect_ratio\": \"16:9\"\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://lavendly.ai/api/v1/videos")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"google/veo-3.1-lite\",\n \"prompt\": \"Aerial drone shot of a red motorcycle on a dune, golden hour\",\n \"duration\": 6,\n \"aspect_ratio\": \"16:9\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://lavendly.ai/api/v1/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\": \"google/veo-3.1-lite\",\n \"prompt\": \"Aerial drone shot of a red motorcycle on a dune, golden hour\",\n \"duration\": 6,\n \"aspect_ratio\": \"16:9\"\n}"
response = http.request(request)
puts response.read_body{
"id": "JOB_ID",
"status": "pending"
}{
"error": {
"code": "invalid_args",
"message": "..."
}
}{
"error": {
"code": "unauthenticated",
"message": "..."
}
}{
"error": {
"code": "insufficient_credits",
"message": "..."
}
}{
"error": {
"code": "viewer_read_only",
"message": "..."
}
}{
"error": {
"code": "rate_limited",
"message": "Rate limit exceeded for mutation requests. Retry in ~12s.",
"retry_after_ms": 11480,
"limit": 20,
"window_seconds": 60,
"class": "mutation"
}
}Authorizations
API key from Settings > API, e.g. lv_...
Headers
Replays the first response for 24 hours instead of charging twice.
Body
application/json
Was this page helpful?