Skip to content
DepthCarve

Depth map API

A depth map API with explicit cost and failure boundaries

Send a compressed image data URI, receive a temporary depth-map URL, and account for every request with an API key and a credit ledger. Built for controlled integration, not hidden browser secrets.

  • Server-side scoped API keys
  • One credit per successful request
  • Automatic provider-failure refund
depth map api preview with a grayscale field and carved relief surface
Preview → range → production file

Live workbench

Image in. Usable depth out.

Three free previews per day. No account needed. Your source image is not stored in our database.

Depth map relief preview showing layered carved contours

Choose a source image to begin.

The 16-bit option is a compatibility container derived from the AI preview; it does not invent extra source precision. Always test relief direction, scale, and material settings on scrap before production.

Server-to-server only

One bounded request contract

Create a key in your Production account, compress the image on a trusted backend, and copy the temporary response file immediately.

curl https://depthcarve.com/api/v1/depth-map \
  --request POST \
  --header "Authorization: Bearer $DEPTHCARVE_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{"imageDataUri":"data:image/webp;base64,..."}'

Maximum compressed data URI: 1.5 MB. Rate limit: 60 requests per minute. One successful request costs one credit; provider failure returns it.

Real work, real failure cost

Built around the people who pay for a bad output

The useful product is not the model call. It is the review loop that catches a reversed field, a noisy border, or an impossible relief before the next tool turns that mistake into wasted time.

01

Product teams

Ship depth-aware features without exposing provider credentials.

02

Creative platforms

Add preprocessing to batch and user-generated workflows.

03

3D pipeline teams

Validate demand before self-hosting a dedicated model.

01

What matters in a depth map api workflow

The DepthCarve API accepts JSON at POST /api/v1/depth-map with a Bearer API key and an imageDataUri field. Input is validated before a provider call and limited to compressed PNG, JPEG, or WebP data. A useful result preserves the shapes that control the next operation while suppressing background distance, edge halos, and texture that would become false geometry. DepthCarve keeps the source beside the estimate and exposes range controls before export, so a technically valid file does not get mistaken for production-ready input.

Resize and compress in your own trusted backend, set a client timeout, and save the returned file immediately. Do not place a live DepthCarve key in public JavaScript or a mobile application bundle. Black point removes low-value range, white point sets the upper boundary, contrast separates meaningful levels, and inversion chooses which end becomes raised or near. These controls are applied to the output instead of triggering another inference, which makes comparison fast and keeps model usage predictable.

02

Move the output into your backend, queue, or media pipeline

Start with the free 8-bit PNG to confirm orientation, crop, and silhouette in your backend, queue, or media pipeline. If the receiving application expects a 16-bit grayscale container, authorize that export after the preview is approved. When the next stage needs closed geometry, set real dimensions and build the watertight relief STL rather than importing an open displacement sheet.

The optional geometry bundle adds provider-generated depth, normals, point cloud, GLB, and camera information for workflows that need more than a grayscale preview. Provider files are temporary and should be downloaded immediately. Keep the chosen DepthCarve settings with the project so a revision can be reproduced without guessing which range or inversion created the approved result.

03

Check the file before it becomes expensive

The current response is a relative visual depth preview, not certified metric distance. External URLs are temporary, and production code must copy required output into its own authorized storage. Zoom into boundaries, look for isolated bright or dark islands, and test the output at the final aspect ratio. A higher mesh grid or a 16-bit container cannot repair an incorrect scene interpretation. Correct the crop, source lighting, or depth range first; only add density after the underlying field is useful.

DepthCarve makes previews free because visual approval should happen before a professional export or provider job is charged. Paid provider failures create a unique refund entry automatically. That protection covers technical failure, not an aesthetically unsuitable but completed estimate, so the preview remains the essential acceptance gate.

04

Privacy, repeatability, and a bounded production path

The browser compresses the selected image before it leaves the device. The source is sent to the chosen inference provider only when Generate is pressed, and D1 stores job state, an input fingerprint, and credit entries rather than the original file. Model output URLs can expire, so download approved assets into the normal project archive instead of treating a provider link as storage.

Every credit movement carries a unique reference. Repeated callbacks cannot grant the same purchase twice, and repeated export authorization for the same user, job, and format does not keep charging. External requests retry only bounded server errors. Clear failures are returned to the interface rather than being hidden behind a permanent loading state.

Three bounded stages

A file moves forward only after it earns approval

  1. 1

    Preview

    Generate relative depth for free. Compare it with the source and reject an unsuitable image before a professional format is involved.

  2. 2

    Prepare

    Set range, direction, physical dimensions, and mesh density around the receiving tool instead of relying on an opaque default.

  3. 3

    Verify

    Download immediately, inspect in the actual downstream software, and run a low-cost test before committing production material.

Choose by next action

The formats are not interchangeable

OutputUse it forIt does not guaranteeCost
8-bit PNGPreview, mask, laser and compositing testsPhysical scale or machine settingsFree
16-bit PNG containerCompatibility with grayscale depth workflowsAdditional source precision1 credit
Watertight STLSlicing, CAM import, relief renderingPrintability, tool reach, or safe G-code3 credits
Geometry bundleDepth, normal, PLY, GLB and camera testsHidden surfaces or certified metric truth4 credits

Straight answers

Questions before you commit a file

How do I authenticate to the Depth Map API?

Create an API key from a Production account and send it as Authorization: Bearer dc_live_… from your server. Keys are shown once and stored only as hashes.

Can I try the depth map api without an account?

Yes. Generate up to three depth previews per day and download an 8-bit PNG without signing in. Professional formats and geometry use credits.

Will a 16-bit export add more model detail?

No. It places the adjusted preview values in a 16-bit grayscale PNG container for compatibility. It does not invent precision missing from the model output.

What should I do after exporting?

Open the file in your backend, queue, or media pipeline, verify units and direction, inspect at final size, and run a low-cost test before committing production material or a client deadline.

Preview the idea. Pay for usable output.

Start without an account. When a professional format earns approval, use the five welcome credits or choose a pack that matches the shop's workload.