Run Veo 3.1 (veo-31)
For unparalleled detail and nuance, perfect for when your vision requires the best possible quality.
Submits an asynchronous job and returns 202 with a job id. Fetch the result at GET /v3/jobs/{job_id} — each item in its outputs[] follows the OutputItem schema — or track progress via GET /v3/jobs/{job_id}/status / the SSE stream at GET /v3/jobs/{job_id}/stream.
curl --request POST \
--url https://api.hedra.com/v3/models/veo-31 \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"input": {
"prompt": "<string>",
"num_outputs": 1,
"generate_audio": true,
"negative_prompt": "<string>",
"start_image": {
"source": "url",
"url": "<string>"
},
"end_image": {
"source": "url",
"url": "<string>"
},
"source_video": {
"source": "url",
"url": "<string>"
},
"images": [
{
"source": "url",
"url": "<string>"
}
],
"seed": 2147483647
},
"webhook": null,
"idempotency_key": null
}
'import requests
url = "https://api.hedra.com/v3/models/veo-31"
payload = {
"input": {
"prompt": "<string>",
"num_outputs": 1,
"generate_audio": True,
"negative_prompt": "<string>",
"start_image": {
"source": "url",
"url": "<string>"
},
"end_image": {
"source": "url",
"url": "<string>"
},
"source_video": {
"source": "url",
"url": "<string>"
},
"images": [
{
"source": "url",
"url": "<string>"
}
],
"seed": 2147483647
},
"webhook": None,
"idempotency_key": None
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
input: {
prompt: '<string>',
num_outputs: 1,
generate_audio: true,
negative_prompt: '<string>',
start_image: {source: 'url', url: '<string>'},
end_image: {source: 'url', url: '<string>'},
source_video: {source: 'url', url: '<string>'},
images: [{source: 'url', url: '<string>'}],
seed: 2147483647
},
webhook: null,
idempotency_key: null
})
};
fetch('https://api.hedra.com/v3/models/veo-31', 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.hedra.com/v3/models/veo-31",
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([
'input' => [
'prompt' => '<string>',
'num_outputs' => 1,
'generate_audio' => true,
'negative_prompt' => '<string>',
'start_image' => [
'source' => 'url',
'url' => '<string>'
],
'end_image' => [
'source' => 'url',
'url' => '<string>'
],
'source_video' => [
'source' => 'url',
'url' => '<string>'
],
'images' => [
[
'source' => 'url',
'url' => '<string>'
]
],
'seed' => 2147483647
],
'webhook' => null,
'idempotency_key' => null
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.hedra.com/v3/models/veo-31"
payload := strings.NewReader("{\n \"input\": {\n \"prompt\": \"<string>\",\n \"num_outputs\": 1,\n \"generate_audio\": true,\n \"negative_prompt\": \"<string>\",\n \"start_image\": {\n \"source\": \"url\",\n \"url\": \"<string>\"\n },\n \"end_image\": {\n \"source\": \"url\",\n \"url\": \"<string>\"\n },\n \"source_video\": {\n \"source\": \"url\",\n \"url\": \"<string>\"\n },\n \"images\": [\n {\n \"source\": \"url\",\n \"url\": \"<string>\"\n }\n ],\n \"seed\": 2147483647\n },\n \"webhook\": null,\n \"idempotency_key\": null\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<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.hedra.com/v3/models/veo-31")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"input\": {\n \"prompt\": \"<string>\",\n \"num_outputs\": 1,\n \"generate_audio\": true,\n \"negative_prompt\": \"<string>\",\n \"start_image\": {\n \"source\": \"url\",\n \"url\": \"<string>\"\n },\n \"end_image\": {\n \"source\": \"url\",\n \"url\": \"<string>\"\n },\n \"source_video\": {\n \"source\": \"url\",\n \"url\": \"<string>\"\n },\n \"images\": [\n {\n \"source\": \"url\",\n \"url\": \"<string>\"\n }\n ],\n \"seed\": 2147483647\n },\n \"webhook\": null,\n \"idempotency_key\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hedra.com/v3/models/veo-31")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"input\": {\n \"prompt\": \"<string>\",\n \"num_outputs\": 1,\n \"generate_audio\": true,\n \"negative_prompt\": \"<string>\",\n \"start_image\": {\n \"source\": \"url\",\n \"url\": \"<string>\"\n },\n \"end_image\": {\n \"source\": \"url\",\n \"url\": \"<string>\"\n },\n \"source_video\": {\n \"source\": \"url\",\n \"url\": \"<string>\"\n },\n \"images\": [\n {\n \"source\": \"url\",\n \"url\": \"<string>\"\n }\n ],\n \"seed\": 2147483647\n },\n \"webhook\": null,\n \"idempotency_key\": null\n}"
response = http.request(request)
puts response.read_body{
"job_id": "<string>",
"model": "<string>",
"status_url": "<string>",
"result_url": "<string>",
"estimated_completion_at": "2023-11-07T05:31:56Z"
}Authorizations
Primary scheme: Authorization: Key <key_id>:<secret>.
Body
Response
Accepted. The job runs asynchronously; poll status_url / result_url from the ack.
This job's id — server-issued, and opaque.
The four states a job can be in.
IN_QUEUE, IN_PROGRESS, COMPLETED, FAILED Path of this job's status monitor: poll GET /v3/jobs/{job_id}/status for status, progress, and an estimate.
Path of the job resource itself: GET /v3/jobs/{job_id} returns the result envelope, including the outputs once it completes. Also the value of this response's Location header.
ISO-8601 instant this job is estimated to finish. Null when no estimate exists for the model yet; poll GET /v3/jobs/{job_id}/status for a refreshed one.
Was this page helpful?
curl --request POST \
--url https://api.hedra.com/v3/models/veo-31 \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"input": {
"prompt": "<string>",
"num_outputs": 1,
"generate_audio": true,
"negative_prompt": "<string>",
"start_image": {
"source": "url",
"url": "<string>"
},
"end_image": {
"source": "url",
"url": "<string>"
},
"source_video": {
"source": "url",
"url": "<string>"
},
"images": [
{
"source": "url",
"url": "<string>"
}
],
"seed": 2147483647
},
"webhook": null,
"idempotency_key": null
}
'import requests
url = "https://api.hedra.com/v3/models/veo-31"
payload = {
"input": {
"prompt": "<string>",
"num_outputs": 1,
"generate_audio": True,
"negative_prompt": "<string>",
"start_image": {
"source": "url",
"url": "<string>"
},
"end_image": {
"source": "url",
"url": "<string>"
},
"source_video": {
"source": "url",
"url": "<string>"
},
"images": [
{
"source": "url",
"url": "<string>"
}
],
"seed": 2147483647
},
"webhook": None,
"idempotency_key": None
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
input: {
prompt: '<string>',
num_outputs: 1,
generate_audio: true,
negative_prompt: '<string>',
start_image: {source: 'url', url: '<string>'},
end_image: {source: 'url', url: '<string>'},
source_video: {source: 'url', url: '<string>'},
images: [{source: 'url', url: '<string>'}],
seed: 2147483647
},
webhook: null,
idempotency_key: null
})
};
fetch('https://api.hedra.com/v3/models/veo-31', 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.hedra.com/v3/models/veo-31",
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([
'input' => [
'prompt' => '<string>',
'num_outputs' => 1,
'generate_audio' => true,
'negative_prompt' => '<string>',
'start_image' => [
'source' => 'url',
'url' => '<string>'
],
'end_image' => [
'source' => 'url',
'url' => '<string>'
],
'source_video' => [
'source' => 'url',
'url' => '<string>'
],
'images' => [
[
'source' => 'url',
'url' => '<string>'
]
],
'seed' => 2147483647
],
'webhook' => null,
'idempotency_key' => null
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.hedra.com/v3/models/veo-31"
payload := strings.NewReader("{\n \"input\": {\n \"prompt\": \"<string>\",\n \"num_outputs\": 1,\n \"generate_audio\": true,\n \"negative_prompt\": \"<string>\",\n \"start_image\": {\n \"source\": \"url\",\n \"url\": \"<string>\"\n },\n \"end_image\": {\n \"source\": \"url\",\n \"url\": \"<string>\"\n },\n \"source_video\": {\n \"source\": \"url\",\n \"url\": \"<string>\"\n },\n \"images\": [\n {\n \"source\": \"url\",\n \"url\": \"<string>\"\n }\n ],\n \"seed\": 2147483647\n },\n \"webhook\": null,\n \"idempotency_key\": null\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<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.hedra.com/v3/models/veo-31")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"input\": {\n \"prompt\": \"<string>\",\n \"num_outputs\": 1,\n \"generate_audio\": true,\n \"negative_prompt\": \"<string>\",\n \"start_image\": {\n \"source\": \"url\",\n \"url\": \"<string>\"\n },\n \"end_image\": {\n \"source\": \"url\",\n \"url\": \"<string>\"\n },\n \"source_video\": {\n \"source\": \"url\",\n \"url\": \"<string>\"\n },\n \"images\": [\n {\n \"source\": \"url\",\n \"url\": \"<string>\"\n }\n ],\n \"seed\": 2147483647\n },\n \"webhook\": null,\n \"idempotency_key\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hedra.com/v3/models/veo-31")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"input\": {\n \"prompt\": \"<string>\",\n \"num_outputs\": 1,\n \"generate_audio\": true,\n \"negative_prompt\": \"<string>\",\n \"start_image\": {\n \"source\": \"url\",\n \"url\": \"<string>\"\n },\n \"end_image\": {\n \"source\": \"url\",\n \"url\": \"<string>\"\n },\n \"source_video\": {\n \"source\": \"url\",\n \"url\": \"<string>\"\n },\n \"images\": [\n {\n \"source\": \"url\",\n \"url\": \"<string>\"\n }\n ],\n \"seed\": 2147483647\n },\n \"webhook\": null,\n \"idempotency_key\": null\n}"
response = http.request(request)
puts response.read_body{
"job_id": "<string>",
"model": "<string>",
"status_url": "<string>",
"result_url": "<string>",
"estimated_completion_at": "2023-11-07T05:31:56Z"
}