About Depth Pro 2
The Depth Pro 2 API turns an image URL into a depth map with the same width and height as the source. There is no prompt: a request is image_url plus three optional fields. With metric_depth on, the job also returns a single-channel 32-bit float OpenEXR in meters for pipelines that need real distances. Our 2048 by 878 test completed in 22 seconds including queue time, so run it as a background step rather than behind a slider.
Call it with the model name apple/depth-pro-2/edit on POST /jobs/createTask, from $0.012.
Introduction
Overview
Apple Depth Pro 2 turns a single still photograph into a sharp depth map at the exact input resolution. It needs no text prompt or camera intrinsics. Use grayscale for depth-conditioned generation and ControlNet pipelines, or inferno and turbo for visual checks. Turn on metric_depth to also download a single-channel 32-bit float OpenEXR file storing absolute distance in meters.
Parameters
| Parameter | Type | Default | Notes |
|---|---|---|---|
image_url | string (URI) | Required | JPEG, PNG or WebP source photo |
colormap | string | grayscale | grayscale, inferno, or turbo |
output_format | string | png | png, jpeg, or webp for the rendered depth image |
metric_depth | boolean | false | When true, appends a 32-bit float OpenEXR metric depth file in meters |
Request parameters
| Parameter | Required | Description |
|---|---|---|
colormap | No | How depth is drawn: grayscale (near is white, far is black) for other tools, or inferno and turbo to read by eye. grayscale · inferno · turbo · Default: grayscale |
image_url | Yes | The picture to start from. |
metric_depth | No | Also return a 32-bit EXR file with real distances in meters. Does not change the price. Default: false |
output_format | No | File type of the result. png · jpeg · webp · Default: png |
Pricing
Prices are in USD and charged to your PopNow balance. When a task is accepted, we reserve the maximum quoted amount from your PopNow balance. On completion, we charge for actual usage, never more than the hold, and release the remainder. If the task fails, the hold is released.
| Option | USD per run |
|---|---|
| Standard | $0.012 |
Send the same request body to POST /jobs/quote to see the estimated and maximum USD charge before running. A quote does not run the task or charge your balance.
API quick start
Call the Depth Pro 2 API in three steps
- Create an API key. Sign in to PopNow and create a key in the API console. Keys start with sk-popnow-. API calls are billed in USD from your PopNow balance.
- Send the request. POST /jobs/createTask with model apple/depth-pro-2/edit and an input object that follows the parameter table. The response returns a task ID straight away.
- Get the result. Poll GET /jobs/recordInfo with the task ID, or pass a callBackUrl and we post the result to it. Download the output links when the task succeeds.
# 1. Create the task. Keep the Idempotency-Key if you retry after a network error.
export IDEMPOTENCY_KEY="$(uuidgen)"
curl -X POST https://api.popnow.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $POPNOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-d '{
"model": "apple/depth-pro-2/edit",
"input": {
"image_url": "https://media.popnow.ai/influencer/examples/marco.webp",
"colormap": "grayscale"
}
}'
# 2. Copy data.taskId from the response, then poll until state is succeeded, failed, canceled or expired.
TASK_ID="TASK_ID_FROM_RESPONSE"
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=$TASK_ID" \
-H "Authorization: Bearer $POPNOW_API_KEY"Replace the prompt and any links with your own. The API tab has the response, polling and callback reference.
What to build with the Depth Pro 2 API
- A depth pre-pass for depth-conditioned generation: run grayscale on the user's upload, store the PNG beside the original asset, and hand it to the next model as its control image.
- A compositing helper that downloads the metric EXR and drives distance-based fog, a focus pull or a depth matte inside your editor, using meters directly instead of guessing a scale.
- A layering check in an image or 3D product: show the inferno or turbo render next to the picture so users can see whether foreground and background separate the way they expect.
Depth Pro 2 parameter notes
- image_url is the only required field and must be a direct JPEG, PNG or WebP link. The page upload caps files at 10 MB; convert HEIC and RAW camera files before sending.
- colormap defaults to grayscale, near white and far black. inferno and turbo exist for visual inspection. If a downstream model wants near-is-dark, invert the grayscale yourself rather than switching to a colour palette.
- output_format (png by default, jpeg or webp) applies to the rendered map only; the metric file is always OpenEXR. Keep png when the map will be thresholded or used as a control image, since lossy compression adds blocky edges.
- metric_depth is false by default. When true the job yields two files, the rendered map and the EXR, so match them by extension or content type rather than by array position.
- Sky pixels in the EXR are stored as infinity. Replace them with a far-plane value before computing statistics or normalising to a 0 to 1 range, or a single sky pixel breaks the scale.
How Depth Pro 2 API pricing adds up
Each request is billed once per input image. Colormap, output format and the metric EXR do not change the price, so metric_depth is extra data at no extra cost. A batch's total is simply the number of images processed. Approve the quoted maximum, then read the final costUsd from the finished task.
- Depth Map: $0.012 per run, $1.20 for 100 runs
Async jobs, webhooks and rate limits
Every Depth Pro 2 request is asynchronous: createTask returns a taskId straight away, and the result arrives when the job finishes. Poll GET /jobs/recordInfo every few seconds, or pass a public https callBackUrl and verify the X-Webhook-Signature header (HMAC-SHA256 over taskId, timestamp and the body hash) before trusting the payload. Each account gets 1,000 write requests per 10 seconds; a 429 carries Retry-After. Send an Idempotency-Key with createTask so a retried request for apple/depth-pro-2/edit never runs or bills twice.
Common Depth Pro 2 API errors
| errorCode | What it usually means and how to fix it |
|---|---|
invalid_asset | The image URL could not be downloaded or is not a JPEG, PNG or WebP. Pre-convert other camera formats and send direct file links, not gallery or share pages. |
invalid_request | colormap or output_format is outside its enum, or metric_depth was sent as a string. Send the boolean true, not the text "true". |
timeout | Look up the taskId with recordInfo before resubmitting; a second submission is billed again even if the first finishes later. |
Depth Pro 2 API questions
How much does the Depth Pro 2 API cost?
Depth Pro 2 costs $0.012 per run. API usage is charged in USD to your PopNow balance. When a task is accepted, we reserve the maximum quoted amount from your PopNow balance. On completion, we charge for actual usage, never more than the hold, and release the remainder. If the task fails, the hold is released.
What is the model name for Depth Pro 2 in the API?
Put apple/depth-pro-2/edit for Depth Map in the model field of POST /jobs/createTask.
Is the grayscale PNG metric?
No. It is a rendered map for viewing and conditioning. Request metric_depth and read the EXR when you need meters.
Can the API return near-is-black output?
Not as an option. Invert the grayscale PNG in your own pipeline; it is a single pass over the pixels.
Does this endpoint accept video?
No. Clips go to Depth Pro 2 Video, a separate endpoint billed per second that keeps the source audio.
What are the limits of the Depth Pro 2 API?
Largest upload: 10 MB. Requests outside these limits are rejected before anything is charged.
Can I try Depth Pro 2 without writing code?
Run Depth Pro 2 in the Playground without an API key, using the same PopNow balance as the website, shown in USD. Each run appears in your developer history with its matching code.
All Depth models
Depth Pro 2 Video runs the same estimation over a clip of 1 to 120 seconds, keeps the original sound and is billed per second. Use the still version for photos, single frames and keyframes.