POST /v3/ai/image-generations

AI Generator - Generate Images

Use a text prompt to generate images. Use of this endpoint is restricted to clients with an AI Generation license product.

The Image Generations Request

The ImageGenerationsRequest payload to be posted contains the required prompt as well as some other optional parameters:

ParameterPurpose
prompt RequiredThe primary text used for the generation of the images.
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.
negative_promptConcepts to exclude from the result
aspect_ratioThe "width:height" aspect ratio of the resultant images. Must be one of: 1:1, 3:4, 4:3, 9:16, or 16:9
media_typeMedia type of the results: photography or illustration
moodCan be black_and_white, warm, cool, natural, vivid, dramatic, or bold

Fulfilled and Pending Results

In many cases the result of this call will be the final fulfilled result. In these cases, you will see a HTTP 200 OK result and a payload including URLs to the result images and a generation request id value.

However some generations may take more time than can be accommodated in the initial call. In these cases the result of this call is HTTP 202 Accepted and the payload will only contain a generation request id value. This value must be retained by the client for subsequent polling of the GET beta/ai/image-generations/{generationRequestId} Get Images Generation endpoint.

Lifetime of Generated Images

Generated images will be retained for 6 months after generation.

Servers

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Request body fields

Name Type Required Description
prompt String No

The only required parameter, this is the primary text used for the generation of the images.

project_code String No

The project code to use for the generation request. Some products require this value.

seed Integer No

The seed to use for generation. This is not used for most generation cases but is available for use to ensure a repeatable result.

notes String No

The notes to use for the generation request. Some products require this value.

negative_prompt String No

Concepts to exclude from the result

media_type String No

Valid values:

  • "illustration"
  • "photography"
aspect_ratio String No

Aspect ratio of the result images. Must be one of 1:1, 3:4, 4:3, 9:16, or 16:9

product_id Integer No

If you have multiple Getty products, indicate which one you would like to use for this generation request

mood String No

Valid values:

  • "black_and_white"
  • "warm"
  • "dramatic"
  • "bold"
  • "natural"
  • "vivid"
  • "cool"

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.