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",
"keep_audio": false,
"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",
"keep_audio": False,
"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',
keep_audio: false,
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',
'keep_audio' => false,
'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 \"keep_audio\": false,\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 \"keep_audio\": false,\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 \"keep_audio\": false,\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.
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",
"keep_audio": false,
"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",
"keep_audio": False,
"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',
keep_audio: false,
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',
'keep_audio' => false,
'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 \"keep_audio\": false,\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 \"keep_audio\": false,\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 \"keep_audio\": false,\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"
}
}Authorizations
API key as a bearer token: Authorization: Bearer bpx_live_xxx
Body
The video to turn into a depth map (up to 30 seconds, MP4/MOV/WebM, ≤100MB). A public video URL or an uploaded-file URL from POST /v1/uploads (videos are passed by URL, not inlined).
grayscale (near = white) is what video models take as a depth reference; turbo, inferno, magma and viridis colour it for viewing.
grayscale, turbo, inferno, magma, viridis Copy the input's audio into the depth video.
The output's short side; auto keeps the input's size up to 1080p. Never upscales. The price is the same at every resolution.
auto, 360p, 480p, 720p, 1080p Return the input on the left and the depth map on the right, twice the width.
Model size, which sets the per-second rate: small 20, base 30, large 40 credits.
small, base, large Response
Job accepted.
Total price of this job (seconds x the size's per-second rate). Held now
Opaque job id (dpt_...) — use it to poll status.
Billed duration — the input video's length, rounded up to whole seconds, at least 5.
The model size the job runs at.
small, base, large Lifecycle state. succeeded/failed/timeout are terminal.
pending, starting, processing, completing, succeeded, failed, timeout