curl --request GET \
--url https://api.budgetpixel.com/v1/depth-maps/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.budgetpixel.com/v1/depth-maps/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.budgetpixel.com/v1/depth-maps/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.budgetpixel.com/v1/depth-maps/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.budgetpixel.com/v1/depth-maps/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.budgetpixel.com/v1/depth-maps/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"completed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"error_message": "<string>",
"id": "<string>",
"model": "<string>",
"status": "pending",
"video_codec": "h264",
"video_codec_note": "<string>",
"video_url": "<string>",
"face_landmarks_url": "<string>",
"face_mesh": {
"coverage": 123,
"drawn": true,
"faces": [
{
"first_frame": 123,
"frames": 123,
"id": 123,
"interpolated_frames": 123,
"last_frame": 123
}
],
"frames": 123,
"frames_with_face": 123
}
}{
"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"
}
}Get depth map job status
Poll until status is succeeded. The depth video is returned as a
short-lived signed video_url (valid for several hours; re-call for a fresh
URL anytime — the underlying object is deleted 24h after generation).
The depth video is an H.264 MP4 at the input’s frame size (up to 1080p,
or the resolution you asked for) and frame rate (up to 30 fps). In
grayscale, near is white and far is black.
With face_mesh or include_face_landmarks, the response adds
face_mesh (how much of the clip had a face, and each face’s frames)
and, with include_face_landmarks, a signed face_landmarks_url.
curl --request GET \
--url https://api.budgetpixel.com/v1/depth-maps/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.budgetpixel.com/v1/depth-maps/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.budgetpixel.com/v1/depth-maps/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.budgetpixel.com/v1/depth-maps/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.budgetpixel.com/v1/depth-maps/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.budgetpixel.com/v1/depth-maps/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"completed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"error_message": "<string>",
"id": "<string>",
"model": "<string>",
"status": "pending",
"video_codec": "h264",
"video_codec_note": "<string>",
"video_url": "<string>",
"face_landmarks_url": "<string>",
"face_mesh": {
"coverage": 123,
"drawn": true,
"faces": [
{
"first_frame": 123,
"frames": 123,
"id": 123,
"interpolated_frames": 123,
"last_frame": 123
}
],
"frames": 123,
"frames_with_face": 123
}
}{
"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
Response
Current job status. video_url is populated once succeeded.
With include_face_landmarks, once status=succeeded: a short-lived signed URL to a JSON
file (format: budgetpixel-face-landmarks/1) with, per frame and per face, 478 [x, y, z]
landmarks (x and y as fractions of the frame), 52 blendshape scores (names in
blendshape_names) and a 4x4 head-pose matrix. Kept 7 days.