
SAM 2.1 Hiera Large
Click or draw a box on an object and get back a mask outlining it.
Fine-tunableDEPTH_ANYTHING_V2_SMALLTurns any photo into a depth map that shows which parts are near and which are far.

| Name | Type | Required | Default | Details |
|---|---|---|---|---|
image | file | Yes | — | The photo: PNG, JPEG or WebP, at most 50 MB and 40 megapixels, at least 32 pixels a side and at most 4:1. The depth map has the photo's size, scaled down to 2048 pixels on the longer side. 1–2048 characters · image/png, jpeg, webp |
output | text | No | png16 | png16: a 16-bit grayscale PNG with the raw depth (metric models: millimetres; relative models: nearness scaled to 0-65535). colormap: a colour picture for viewing, near is bright. Allowed: png16, colormap |
Output. Returns PNG image: The depth map as a PNG (16-bit grayscale or a colour picture, as chosen in output).
Send your API key in the X-API-Key header. The run is asynchronous: submit it, then poll it until it finishes. Create an API key.
curl -X POST "https://api.kainguru.com/api/v1/executions?mlFlowId=DEPTH_ANYTHING_V2_SMALL" \
-H "X-API-Key: kg_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"input": {
"image": "https://example.com/input.png",
"output": "png16"
},
"outputFormat": "json"
}'
# Poll until the execution reaches a terminal state
curl "https://api.kainguru.com/api/v1/executions/{executionId}" \
-H "X-API-Key: kg_your_api_key"from kainguru import KainguruClient
with KainguruClient(api_key="kg_your_api_key", base_url="https://api.kainguru.com/api") as client:
submitted = client.executions.execute(
"DEPTH_ANYTHING_V2_SMALL",
{
"image": "https://example.com/input.png",
"output": "png16"
},
output_format="json",
)
result = client.executions.await_completion(submitted.id)
print(result.execution.output)You can fine-tune Depth Anything v2 Small on your own data and run the tuned model through the same API. Dataset: One ZIP (at most 4 GB, 5000 entries, no password) with 4 to 1000 photos, a depth map for each and a manifest.jsonl with one {"file", "depth"} line per pair. Depth maps are 16-bit grayscale PNGs of distance. More rules: Good to know, in the README.
The steps are in the docs.
Price per image: 0.0874 credits ($0.000874). The price is shown again before every run; all prices are on the pricing page.

Click or draw a box on an object and get back a mask outlining it.
Fine-tunable
Outlines the things you name in a picture, such as "red car, person with a helmet", with a mask and a box for each one.
Fine-tunable
Finds every person in a photo and returns 133 keypoints for each: body, feet, face and both hands, as JSON in the…
Fine-tunable
Finds the points two pictures have in common and pairs them up: send two photos of one scene and get the matching…
Fine-tunable
Cuts people out of photos with a soft alpha matte that keeps hair and fine edges, and returns the cutout or the matte…
Fine-tunable
Estimates metric depth, surface normals and the camera's field of view from a single photo of any scene, indoors or out.
Fine-tunable