← All models
Image2Pixel
image2pixel
Image editby infery
Turn images into pixel-perfect retro art
images
Details
- Accepts
- image
Pricing
- Price
- 0.021 cr / second
Prices in credits (1 credit = $0.01).
Data schema
Input
| Field | Type | Description |
|---|---|---|
| scale | — | Force a specific pixel scale. If None, auto-detect. |
| image_urlrequired | string | The image URL to process into improved pixel art |
| snap_grid | boolean | Align output to the pixel grid. |
| sync_mode | boolean | If `True`, the media will be returned as a data URI and the output data won't be available in the request history. |
| max_colors | — | Maximum number of colors in the output palette. Set None to disable limit. |
| trim_borders | boolean | Trim borders of the image. |
| cleanup_jaggy | boolean | Remove isolated diagonal pixels (jaggy edge cleanup). |
| cleanup_morph | boolean | Apply morphological operations to remove noise. |
| detect_method | stringenum: auto, runs, edge | Scale detection method to use. |
| fixed_palette | — | Optional fixed color palette as hex strings (e.g., ['#000000', '#ffffff']). |
| alpha_threshold | integer | Alpha binarization threshold (0-255). |
| background_mode | stringenum: edges, corners, midpoints | Controls where to flood-fill from when removing the background. |
| downscale_method | stringenum: dominant, median, mode, mean, content-adaptive | Downscaling method to produce the pixel-art output. |
| auto_color_detect | boolean | Enable automatic detection of optimal number of colors. |
| background_tolerance | integer | Background tolerance (0-255). |
| transparent_background | boolean | Remove background of the image. This will check for contiguous color regions from the edges after correction and make them transparent. |
| dominant_color_threshold | number | Dominant color threshold (0.0-1.0). |
Output
| Field | Type | Description |
|---|---|---|
| images | array | The processed pixel-art image (PNG) and the scaled image (PNG). |
| palette | array | The palette of the processed media. |
| num_colors | integer | The number of colors in the processed media. |
| pixel_scale | integer | The detected pixel scale of the input. |