# Iris-Z Small Depth Estimation

> Estimates relative depth from a single image with Iris-Z Small, the lighter variant of the FLUX.2-based joint RGB and depth model, returning a colorized depth map and a float32 log-depth array at the input resolution. An optional multi-seed ensemble combines up to 10 predictions for higher accuracy.


## Overview

- **Endpoint**: `https://fal.run/speridlabs/iris-z/small`
- **Model ID**: `speridlabs/iris-z/small`
- **Category**: image-to-image
- **Kind**: inference
**Tags**: depth estimation, depth map, monocular depth, image to depth



## Pricing

Billing is calculated per ensemble member. Each member costs **$0.01**, so a default single-member request costs **$0.01** and a 10-member ensemble costs **$0.10**. For **$1** you can run approximately **100** single-member depth estimates.

For more details, see [fal.ai pricing](https://fal.ai/pricing).

## API Information

This model can be used via our HTTP API or more conveniently via our client libraries.
See the input and output schema below, as well as the usage examples.


### Input Schema

The API accepts the following input parameters:


- **`image_url`** (`string`, _required_):
  URL of the image to estimate depth for.
  - Examples: "https://storage.googleapis.com/falserverless/example_inputs/dog.png"

- **`resolution`** (`ResolutionEnum`, _optional_):
  Working resolution of the model. `auto` uses 512 for images under 0.5 MP and 1024 otherwise. The depth map is returned at the input image's size. Default value: `"auto"`
  - Default: `"auto"`
  - Options: `"auto"`, `"512"`, `"1024"`

- **`num_inference_steps`** (`integer`, _optional_):
  Number of depth sampling steps. Default value: `4`
  - Default: `4`
  - Range: `1` to `16`

- **`ensemble_size`** (`integer`, _optional_):
  Number of seeds whose depth predictions are aligned and median-combined. Larger ensembles are more accurate and proportionally slower; each member is billed. Default value: `1`
  - Default: `1`
  - Range: `1` to `10`

- **`seed`** (`integer`, _optional_):
  Random seed. Ensemble members use consecutive seeds from this value.

- **`enable_safety_checker`** (`boolean`, _optional_):
  Authorized callers may set false to request relaxed screening. Default value: `true`
  - Default: `true`



**Required Parameters Example**:

```json
{
  "image_url": "https://storage.googleapis.com/falserverless/example_inputs/dog.png"
}
```

**Full Example**:

```json
{
  "image_url": "https://storage.googleapis.com/falserverless/example_inputs/dog.png",
  "resolution": "auto",
  "num_inference_steps": 4,
  "ensemble_size": 1,
  "enable_safety_checker": true
}
```


### Output Schema

The API returns the following output format:

- **`image`** (`Image`, _required_):
  Colorized depth map (near = red, far = blue, sky = black).

- **`depth_map`** (`File`, _required_):
  Relative log depth as a float32 `.npy` array (height x width). Larger values are farther; sky pixels are 1.0 when the model detects sky.

- **`seed`** (`integer`, _required_):
  The first seed used for depth sampling.



**Example Response**:

```json
{
  "image": {
    "url": "",
    "content_type": "image/png",
    "file_name": "z9RV14K95DvU.png",
    "file_size": 4404019,
    "width": 1024,
    "height": 1024
  },
  "depth_map": {
    "url": "",
    "content_type": "image/png",
    "file_name": "z9RV14K95DvU.png",
    "file_size": 4404019
  }
}
```


## Usage Examples

### cURL

```bash
curl --request POST \
  --url https://fal.run/speridlabs/iris-z/small \
  --header "Authorization: Key $FAL_KEY" \
  --header "Content-Type: application/json" \
  --data '{
     "image_url": "https://storage.googleapis.com/falserverless/example_inputs/dog.png"
   }'
```

### Python

Ensure you have the Python client installed:

```bash
pip install fal-client
```

Then use the API client to make requests:

```python
import fal_client

def on_queue_update(update):
    if isinstance(update, fal_client.InProgress):
        for log in update.logs:
           print(log["message"])

result = fal_client.subscribe(
    "speridlabs/iris-z/small",
    arguments={
        "image_url": "https://storage.googleapis.com/falserverless/example_inputs/dog.png"
    },
    with_logs=True,
    on_queue_update=on_queue_update,
)
print(result)
```

### JavaScript

Ensure you have the JavaScript client installed:

```bash
npm install --save @fal-ai/client
```

Then use the API client to make requests:

```javascript
import { fal } from "@fal-ai/client";

const result = await fal.subscribe("speridlabs/iris-z/small", {
  input: {
    image_url: "https://storage.googleapis.com/falserverless/example_inputs/dog.png"
  },
  logs: true,
  onQueueUpdate: (update) => {
    if (update.status === "IN_PROGRESS") {
      update.logs.map((log) => log.message).forEach(console.log);
    }
  },
});
console.log(result.data);
console.log(result.requestId);
```


## Deploy your own model

To run your own weights, a fine-tune or a custom pipeline on the GPUs that serve this API, deploy it on fal Serverless. GPUs from H100 (80GB) to B300 (288GB), billed per second; an H100 is $4.50/h list, as low as $2.49/h. Prices, GPU specs and deploy steps: [fal Serverless](https://fal.ai/serverless.md).

## Additional Resources

### Documentation

- [Model Playground](https://fal.ai/models/speridlabs/iris-z/small)
- [API Documentation](https://fal.ai/models/speridlabs/iris-z/small/api)
- [OpenAPI Schema](https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=speridlabs/iris-z/small)

### fal.ai Platform

- [Platform Documentation](https://fal.ai/docs/documentation)
- [Python Client](https://fal.ai/docs/api-reference/client-libraries/python)
- [JavaScript Client](https://fal.ai/docs/api-reference/client-libraries/javascript)

### Other agent-readable surfaces

This file covers one model. To find anything else:

- [Platform overview](https://fal.ai/llms.txt): Entry points and representative endpoint IDs
- [Documentation index](https://fal.ai/docs/llms.txt): Every documentation page
- [Full documentation text](https://fal.ai/docs/llms-full.txt): The whole documentation inlined
- [Pricing](https://fal.ai/pricing.md): Model API and Serverless GPU prices
- [fal Serverless](https://fal.ai/serverless.md): Deploy your own models: GPU prices, specs and steps
- Any other model: `https://fal.ai/models/<endpoint-id>/llms.txt`
