# Iris-Z Small Depth to Image

> Generates an image that follows the geometry of a depth map with Iris-Z Small, the lighter variant of the FLUX.2-based joint RGB and depth model, at roughly a third of the generation time of Iris-Z. Accepts depth, disparity or colorized depth maps with an optional text prompt, keeps the input aspect ratio and renders at 512 or 1024 resolution.


## Overview

- **Endpoint**: `https://fal.run/fal-ai/iris-z/small/depth-to-image`
- **Model ID**: `fal-ai/iris-z/small/depth-to-image`
- **Category**: image-to-image
- **Kind**: inference
**Tags**: depth to image, depth conditioning, image generation, flux.2



## Pricing

- **Price**: $0.05 per megapixels

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:


- **`depth_image_url`** (`string`, _required_):
  URL of the depth map to paint an image from.
  - Examples: "https://v3b.fal.media/files/b/0ab2162d/EAn6KNdG-1qqxttNmLiGD.png"

- **`depth_format`** (`DepthFormatEnum`, _optional_):
  How to read the depth map: `depth` (bright = far), `disparity` (bright = near), or `colorized` (the colored depth image returned by this model's depth endpoints). Default value: `"colorized"`
  - Default: `"colorized"`
  - Options: `"depth"`, `"disparity"`, `"colorized"`

- **`prompt`** (`string`, _optional_):
  The prompt to generate an image from. Prompts are truncated to 512 text-encoder tokens. Leave empty for an unconditional image. Default value: `""`
  - Default: `""`
  - Examples: "the same street in winter, snow on the rooftops"

- **`resolution`** (`ResolutionEnum`, _optional_):
  Output resolution tier; the depth map's aspect ratio is kept. Default value: `"1024"`
  - Default: `"1024"`
  - Options: `"512"`, `"1024"`

- **`num_inference_steps`** (`integer`, _optional_):
  The number of inference steps to perform. Default value: `50`
  - Default: `50`
  - Range: `1` to `50`

- **`guidance_scale`** (`float`, _optional_):
  Classifier-free guidance scale. Defaults to the model's own value (3.5 for Iris-Z, 4.0 for Iris-Z small).
  - Range: `1` to `20`

- **`seed`** (`integer`, _optional_):
  The same seed, prompt and depth map given to the same version of the model will output the same image every time.

- **`output_format`** (`OutputFormatEnum`, _optional_):
  The format of the generated image. Default value: `"png"`
  - Default: `"png"`
  - Options: `"png"`, `"jpeg"`

- **`enable_safety_checker`** (`boolean`, _optional_):
  If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. Default value: `true`
  - Default: `true`



**Required Parameters Example**:

```json
{
  "depth_image_url": "https://v3b.fal.media/files/b/0ab2162d/EAn6KNdG-1qqxttNmLiGD.png"
}
```

**Full Example**:

```json
{
  "depth_image_url": "https://v3b.fal.media/files/b/0ab2162d/EAn6KNdG-1qqxttNmLiGD.png",
  "depth_format": "colorized",
  "prompt": "the same street in winter, snow on the rooftops",
  "resolution": "1024",
  "num_inference_steps": 50,
  "output_format": "png",
  "enable_safety_checker": true
}
```


### Output Schema

The API returns the following output format:

- **`images`** (`list<Image>`, _required_):
  The generated images.
  - Array of Image

- **`seed`** (`integer`, _required_):
  The seed used for generation.

- **`has_nsfw_concepts`** (`list<boolean>`, _required_):
  Whether the generated images contain NSFW concepts.
  - Array of boolean

- **`prompt`** (`string`, _required_):
  The prompt used for generation.



**Example Response**:

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


## Usage Examples

### cURL

```bash
curl --request POST \
  --url https://fal.run/fal-ai/iris-z/small/depth-to-image \
  --header "Authorization: Key $FAL_KEY" \
  --header "Content-Type: application/json" \
  --data '{
     "depth_image_url": "https://v3b.fal.media/files/b/0ab2162d/EAn6KNdG-1qqxttNmLiGD.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(
    "fal-ai/iris-z/small/depth-to-image",
    arguments={
        "depth_image_url": "https://v3b.fal.media/files/b/0ab2162d/EAn6KNdG-1qqxttNmLiGD.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("fal-ai/iris-z/small/depth-to-image", {
  input: {
    depth_image_url: "https://v3b.fal.media/files/b/0ab2162d/EAn6KNdG-1qqxttNmLiGD.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/fal-ai/iris-z/small/depth-to-image)
- [API Documentation](https://fal.ai/models/fal-ai/iris-z/small/depth-to-image/api)
- [OpenAPI Schema](https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=fal-ai/iris-z/small/depth-to-image)

### 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`
