Upload reference image to /images/generations

Hi, I was wondering if it is possible to upload an image alongside a prompt when calling /images/generations, similar to how you can upload images in the generation section of the playground.

In the “text and prompting” section of the docs I see that you can supply images alongside a text prompt like so:

            {"type": "input_text", "text": "what's in this image?"},
            {
                "type": "input_image",
                "image_url": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg",
            },

is it possible to do this sort of thing with image generation as well?

Thanks in advance :slight_smile:

You can assure yourself that it is not possible using “generations”, by checking the API reference.

https://platform.openai.com/docs/api-reference/images/create

However, scroll just a bit more, and you’ll see that the edits endpoint now accepts image inputs beyond simply an infill/outfill mask, which can be multiple and which can be compositionally discussed.

One needs API org ID validation to do this with the API model gpt-image-1.