Replace Background with Ideogram 3.0

Replace the background of a given image synchronously using a prompt with Ideogram 3.0. The foreground subject will be identified and kept, while the background is replaced based on the prompt and chosen style. Supported image formats include JPEG, PNG, and WebP. Images links are available for a limited period of time; if you would like to keep the image, you must download it.

Headers

Api-KeystringRequired

Request

This endpoint expects a multipart form with multiple files.
imagefileRequired

The image whose background is being replaced (max size 10MB); only JPEG, WebP and PNG formats are supported at this time.

promptstringRequired

The prompt describing the desired new background.

magic_promptenumOptional

Determine if MagicPrompt should be used in generating the request or not.

Allowed values:
num_imagesintegerOptional>=1<=8

The number of images to generate.

seedintegerOptional>=0<=2147483647

Random seed. Set for reproducible generation.

rendering_speedenumOptionalDefaults to DEFAULT

The rendering speed to use.

Allowed values:
color_paletteobjectOptional

A color palette for generation, must EITHER be specified via one of the presets (name) or explicitly via hexadecimal representations of the color with optional weights (members). Not supported by V_1, V_1_TURBO, V_2A and V_2A_TURBO models.

style_codeslist of stringsOptional

A list of 8 character hexadecimal codes representing the style of the image. Cannot be used in conjunction with style_reference_images or style_type.

style_reference_imagesfilesOptional

A set of images to use as style references (maximum total size 10MB across all style references). The images should be in JPEG, PNG or WebP format.

Response

Background replacement generated successfully.

createddatetime

The time the request was created.

datalist of objects

A list of ImageObjects that contain the generated image(s).

Errors