Estimate depth
Get a depth map for an image, a rectified stereo pair or a short clip.
The map comes back at the image's aspect ratio with its longest side at most 256 pixels. Which inputs a model uses depends on the model: stereo models need right_image, depth-prompted models take prompt_depth, and video depth models take frames.
Authorization
AuthorizationheaderrequiredBearer sk-orb-v1-…, your API key, or a free test key (sk-orb-test-…; no account? get one withPOST /sandbox/keys).
Request body
JSON, with Content-Type: application/json.
modelstringrequiredThe depth model to run, e.g.
bytedance/depth-anything-v2. The live models for this endpoint are listed below.imagestringrequiredThe image (the left image of a stereo pair), base64 JPEG or PNG. Under 4 MB of base64. Required unless you send
frames.intrinsicsnumber[4][fx, fy, cx, cy]in pixels of the image (fx, fy > 0). Metric models that need the focal length use it; stereo models need it for meters.right_imagestringStereo models: the right image of the rectified pair, the same size as
image. Withintrinsicsandbaselinethe depth is in meters.baselinenumberStereo models: the distance between the two cameras, in meters (0–10).
prompt_depthstringDepth-prompted models: a low-resolution depth map of the same view (e.g. from LiDAR) as a 16-bit grayscale PNG in millimetres, 0 for no measurement.
framesstring[]Video depth models: a clip of 1–16 frames, oldest first, all the same size, under 4 MB of base64 together. Send it instead of
image; it can't be combined withright_image,baselineorprompt_depth.
Response
idstringUnique id of this call, e.g.
dep_48213. It matches the call in your Activity dashboard.modelstringThe model that answered.
backendstring"http": the real model ran on a GPU."simulated": stand-in output of the same shape, as test keys get.sandboxbooleantruewhen the call was made with a test key: the output is simulated, nothing ran on a GPU and nothing was charged. Absent otherwise.depthobjectThe depth map (for a clip, the last frame's).
Show 5 child attributes
widthintegerMap width in pixels.
heightintegerMap height in pixels.
unitstring"m": meters."relative_inverse": unitless inverse depth, larger is closer."relative": unitless depth, larger is farther, with unknown scale and shift.scalenumberMap width ÷ your image's width (1 when the image is 256 pixels or smaller).
datanumber[]width × heightvalues, row by row from the top-left.
framesobject[]For a clip: one depth map per frame, oldest first, on one consistent scale.
usageobjectWhat the call cost.
Show 2 child attributes
cost_usdnumberCharged to your credits, in US dollars.
latency_msintegerTime the model took, in milliseconds.
Errors
The errors every endpoint shares: invalid input, keys, credits and cold starts. See Errors.
Models
12 live models for /depth. Each page has a ready-made request.
- Depth Anything V2
bytedance/depth-anything-v2 - Depth Anything 3
bytedance/depth-anything-3 - FoundationStereo
nvidia/foundationstereo - MoGe-2
microsoft/moge-2 - Prompt Depth Anything
bytedance/prompt-depth-anything - Video Depth Anything
bytedance/video-depth-anything - Lotus (Depth G v2.1)
hkust-gz/lotus - Pixel-Perfect Depth
hust/pixel-perfect-depth - MetricAnything (Student DepthMap)
metric-anything/metricanything - Fast-FoundationStereo (C-Fast-FoundationStereo)
nvidia/fast-foundationstereo - Marigold Depth v1.1
prs-eth/marigold-depth-v1-1 - Distill Any Depth
westlake/distill-any-depth