Rendering API
Fill Mode fill
The fill
parameter determines how the excess space in an image resized with fit=fill
or fit=fillmax
should be filled.
Valid values are solid
, blur
and gen
(generative). Note that fill=gen
is a premium feature.
fill=solid
Fills the excess space with the solid color specified by the fill-color
parameter. If fill-color
is not used, the excess space will be white or transparent, depending on whether the image output format supports transparency.
fill=blur
Fills the excess space with a blurred version of the original image. The behavior of fill=blur
is identical to the blur
parameter but is applied only to the excess space.
fill=gen
The fill=gen
mode employs artificial intelligence to seamlessly fill in extra space with generative rendering, enhancing the visual content by adding relevant details where needed.
This approach allows for a more complete fill
output by utilizing AI's capabilities to expand beyond the original confines of the image. By analyzing the context and content of the existing image, fill=gen
intelligently generates and integrates additional elements so you can create the best frame without having to crop out the rest of your images.
Here are some examples below:
Original image: https://assets.imgix.net/example-images/generative-fill/dog-snow-01.jpg?w=500&h=900&auto=compress,format&dpr=2
Generative fill https://assets.imgix.net/example-images/generative-fill/dog-snow-01.jpg?fit=fill&fill=gen&w=500&h=900&auto=compress,format&dpr=2
Generative fill outputs are cached and saved for subsequent resizing or other image transformations as long as the generative fill parameters are unchanged. This includes other additional parameters for controlling and modifying the generative fill.
Parameters modifying generative fill output can be found here:
fill-gen-prompt
: Text input suggestion for generative fillfill-gen-neg-prompt
: Negative text input suggestion for generative fillfill-gen-fallback
: Controls fallback behavior for generative fillfill-gen-pos
: Controls output positioning of generative fillfill-gen-seed
: Used to generate more predictable outputs
See the API specification for more information about this parameter's value ranges and format.