v1

latestOpenAPI 3.0.42026-07-1376217536.1 KB
AiGenerator

Replace the background of an existing image

AI Generator - Background Replacement

Background Replacement allows the client application to change the background of an existing Getty Images creative image or an existing generated image through the use of prompt text or color information. Four images will be generated when prompt text is submitted, while one image will be generated when color information is submitted.

Use of this endpoint is restricted to clients with an AI Generation license product and may result in the deduction of a credit depending on the terms of your license. When generating new images using a reference_asset_id, the reference image must first be licensed (downloaded) through a traditional license product such as Premium Access before the generated image can be downloaded..

The Background Replacement Request

The BackgroundReplacement Request payload requires one, and only one, reference image (reference_asset_id or reference_generation) and accepts the following optional parameters:

ParameterPurpose
reference_asset_idCreative image ID of the image being used as a reference.
reference_generationGeneration details of the image being used as a reference.
promptThe primary text used for the generation of the images.
negative_promptConcepts to exclude from the result.
background_colorColor information to use for the background replacement. The format is hexadecimal web colors, e.g. #0099CC.
media_typeMedia type of the results: photography or illustration
negative_promptConcepts to exclude from the result.
product_idIf you have multiple AI Generation Getty Images products, indicate which one you would like to use for this generation request. If you have multiple products, this property is required. Can be retrieved from products (GET /v3/products).
project_codeIf your Getty Images Generative AI product requires project_codes, use of this parameter is required. If your product does not require a project_code, this parameter must be excluded from the request. This is for use by Getty Images customers only (not iStock). The products endpoint (GET /v3/products) provides this information.
notesThis is an optional free text parameter often used by clients who wish to include notes specific to their integration. This is for use by Getty Images customers only (not iStock). The products endpoint (GET /v3/products) provides this information.
post/v3/ai/image-generations/background-replacement

Request body

promptstring nullable
reference_asset_idstring nullable
product_idinteger nullable
media_type'photography' | 'illustration'
negative_promptstring nullable
background_colorstring nullable
project_codestring nullable
notesstring nullable

Response

Returns the request ID for a pending request to replace a background

generation_request_idstring nullable