> ## Documentation Index
> Fetch the complete documentation index at: https://docs.comfy.org/llms.txt
> Use this file to discover all available pages before exploring further.

# CreateBoundingBoxes - ComfyUI Built-in Node Documentation

> Complete documentation for the CreateBoundingBoxes node in ComfyUI. Learn its inputs, outputs, parameters and usage.

This node provides a canvas interface for drawing bounding boxes around objects or text regions in an image. It outputs the bounding box coordinates in pixel space, structured element data compatible with Ideogram prompt formatting, and a preview image showing the drawn boxes with labels and color palettes.

## Inputs

| Parameter      | Description                                                                                                                           | Data Type       | Required | Range                  |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------- | --------------- | -------- | ---------------------- |
| `background`   | Optional image used as background in the canvas and preview.                                                                          | IMAGE           | No       | -                      |
| `width`        | Width of the canvas and the pixel grid for the bounding boxes (default: 1024).                                                        | INT             | Yes      | 64 to 16384 (step: 16) |
| `height`       | Height of the canvas and the pixel grid for the bounding boxes (default: 1024).                                                       | INT             | Yes      | 64 to 16384 (step: 16) |
| `editor_state` | Draw bounding boxes and set each box type, text, description, color palette. Start with background element first and foreground last. | BOUNDING\_BOXES | Yes      | -                      |

## Outputs

| Output Name | Description                                                                                                                                                      | Data Type     |
| ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |
| `preview`   | An RGB image showing the canvas with all bounding boxes rendered, including labels, color palette swatches, and descriptive text.                                | IMAGE         |
| `bboxes`    | A list of bounding boxes in pixel coordinates, with each box containing x, y, width, and height values.                                                          | BOUNDING\_BOX |
| `elements`  | A structured array of element objects, each containing type, bounding box coordinates (normalized 0-1000), text (for text type), description, and color palette. | ARRAY         |

> This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! [Edit on GitHub](https://github.com/Comfy-Org/embedded-docs/blob/main/comfyui_embedded_docs/docs/CreateBoundingBoxes/en.md)

***

**Source fingerprint (SHA-256):** `a63939f13edc6c6507590a390dcd6d0a3321febb5831baab1655d9952228612c`
