curl --request POST \
--url https://api.budgetpixel.com/v1/depth-maps/video-depth-anything \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"video": "<string>",
"colormap": "grayscale",
"face_mesh": false,
"include_face_landmarks": false,
"keep_audio": false,
"max_faces": 4,
"resolution": "auto",
"side_by_side": false,
"size": "small"
}
'import requests
url = "https://api.budgetpixel.com/v1/depth-maps/video-depth-anything"
payload = {
"video": "<string>",
"colormap": "grayscale",
"face_mesh": False,
"include_face_landmarks": False,
"keep_audio": False,
"max_faces": 4,
"resolution": "auto",
"side_by_side": False,
"size": "small"
}
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({
video: '<string>',
colormap: 'grayscale',
face_mesh: false,
include_face_landmarks: false,
keep_audio: false,
max_faces: 4,
resolution: 'auto',
side_by_side: false,
size: 'small'
})
};
fetch('https://api.budgetpixel.com/v1/depth-maps/video-depth-anything', 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.budgetpixel.com/v1/depth-maps/video-depth-anything",
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([
'video' => '<string>',
'colormap' => 'grayscale',
'face_mesh' => false,
'include_face_landmarks' => false,
'keep_audio' => false,
'max_faces' => 4,
'resolution' => 'auto',
'side_by_side' => false,
'size' => 'small'
]),
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.budgetpixel.com/v1/depth-maps/video-depth-anything"
payload := strings.NewReader("{\n \"video\": \"<string>\",\n \"colormap\": \"grayscale\",\n \"face_mesh\": false,\n \"include_face_landmarks\": false,\n \"keep_audio\": false,\n \"max_faces\": 4,\n \"resolution\": \"auto\",\n \"side_by_side\": false,\n \"size\": \"small\"\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.budgetpixel.com/v1/depth-maps/video-depth-anything")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"video\": \"<string>\",\n \"colormap\": \"grayscale\",\n \"face_mesh\": false,\n \"include_face_landmarks\": false,\n \"keep_audio\": false,\n \"max_faces\": 4,\n \"resolution\": \"auto\",\n \"side_by_side\": false,\n \"size\": \"small\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.budgetpixel.com/v1/depth-maps/video-depth-anything")
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 \"video\": \"<string>\",\n \"colormap\": \"grayscale\",\n \"face_mesh\": false,\n \"include_face_landmarks\": false,\n \"keep_audio\": false,\n \"max_faces\": 4,\n \"resolution\": \"auto\",\n \"side_by_side\": false,\n \"size\": \"small\"\n}"
response = http.request(request)
puts response.read_body{
"credits": 123,
"id": "<string>",
"message": "<string>",
"model": "<string>",
"seconds": 123,
"size": "small",
"status": "pending"
}{
"error": {
"code": "model_not_available",
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"code": "model_not_available",
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"code": "model_not_available",
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"code": "model_not_available",
"message": "<string>",
"type": "invalid_request_error"
}
}Make a depth map with Video Depth Anything
Turns a video into a depth map video: near is white, far is black, steady from frame to frame, at the input’s size (up to 1080p) and frame rate (up to 30 fps). Feed it to a video model as a structure or motion reference. Three sizes: small is fastest, base adds edge detail, large draws the finest detail (hair, thin poles, distant people) and is the steadiest. Priced per second of the INPUT video, rounded up, 5 seconds minimum: small 20, base 30, large 40 credits/second (input up to 30 seconds, ≤100MB). Output is H.264 MP4. Optional face mesh, at no extra charge: face_mesh draws each face’s mesh (eyes, brows and lips in colour) over the depth so a video model keeps lip, eye and head movement, and include_face_landmarks returns per-frame landmarks, expression scores and head pose as JSON.
Asynchronous. Returns a job id (the video is not in this response). Poll GET /v1/depth-maps/{id} until status is succeeded — the depth video’s URL is in that response’s video_url.
Examples, sample output and pricing: Video Depth Anything
curl --request POST \
--url https://api.budgetpixel.com/v1/depth-maps/video-depth-anything \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"video": "<string>",
"colormap": "grayscale",
"face_mesh": false,
"include_face_landmarks": false,
"keep_audio": false,
"max_faces": 4,
"resolution": "auto",
"side_by_side": false,
"size": "small"
}
'import requests
url = "https://api.budgetpixel.com/v1/depth-maps/video-depth-anything"
payload = {
"video": "<string>",
"colormap": "grayscale",
"face_mesh": False,
"include_face_landmarks": False,
"keep_audio": False,
"max_faces": 4,
"resolution": "auto",
"side_by_side": False,
"size": "small"
}
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({
video: '<string>',
colormap: 'grayscale',
face_mesh: false,
include_face_landmarks: false,
keep_audio: false,
max_faces: 4,
resolution: 'auto',
side_by_side: false,
size: 'small'
})
};
fetch('https://api.budgetpixel.com/v1/depth-maps/video-depth-anything', 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.budgetpixel.com/v1/depth-maps/video-depth-anything",
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([
'video' => '<string>',
'colormap' => 'grayscale',
'face_mesh' => false,
'include_face_landmarks' => false,
'keep_audio' => false,
'max_faces' => 4,
'resolution' => 'auto',
'side_by_side' => false,
'size' => 'small'
]),
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.budgetpixel.com/v1/depth-maps/video-depth-anything"
payload := strings.NewReader("{\n \"video\": \"<string>\",\n \"colormap\": \"grayscale\",\n \"face_mesh\": false,\n \"include_face_landmarks\": false,\n \"keep_audio\": false,\n \"max_faces\": 4,\n \"resolution\": \"auto\",\n \"side_by_side\": false,\n \"size\": \"small\"\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.budgetpixel.com/v1/depth-maps/video-depth-anything")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"video\": \"<string>\",\n \"colormap\": \"grayscale\",\n \"face_mesh\": false,\n \"include_face_landmarks\": false,\n \"keep_audio\": false,\n \"max_faces\": 4,\n \"resolution\": \"auto\",\n \"side_by_side\": false,\n \"size\": \"small\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.budgetpixel.com/v1/depth-maps/video-depth-anything")
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 \"video\": \"<string>\",\n \"colormap\": \"grayscale\",\n \"face_mesh\": false,\n \"include_face_landmarks\": false,\n \"keep_audio\": false,\n \"max_faces\": 4,\n \"resolution\": \"auto\",\n \"side_by_side\": false,\n \"size\": \"small\"\n}"
response = http.request(request)
puts response.read_body{
"credits": 123,
"id": "<string>",
"message": "<string>",
"model": "<string>",
"seconds": 123,
"size": "small",
"status": "pending"
}{
"error": {
"code": "model_not_available",
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"code": "model_not_available",
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"code": "model_not_available",
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"code": "model_not_available",
"message": "<string>",
"type": "invalid_request_error"
}
}Video Depth Anything on BudgetPixel
Authorizations
Body
Response
Job accepted.