Skip to content

Commit bcb15fe

Browse files
add new open ai image model
Signed-off-by: jonghoon park <[email protected]>
1 parent 6c85aea commit bcb15fe

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

models/spring-ai-openai/src/main/java/org/springframework/ai/openai/api/OpenAiImageApi.java

+5
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@ public static Builder builder() {
9191
*/
9292
public enum ImageModel {
9393

94+
/**
95+
* The state-of-the-art image generation model released in April 2025.
96+
*/
97+
GPT_IMAGE_1("gpt-image-1"),
98+
9499
/**
95100
* The latest DALL·E model released in Nov 2023.
96101
*/

spring-ai-docs/src/main/antora/modules/ROOT/pages/api/image/openai-image.adoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
= OpenAI Image Generation
22

33

4-
Spring AI supports DALL-E, the Image generation model from OpenAI.
4+
Spring AI supports Image generation models (DALL-E, GPT Image 1) from OpenAI.
55

66
== Prerequisites
77

@@ -108,8 +108,8 @@ The prefix `spring.ai.openai.image` is the property prefix that lets you configu
108108
| spring.ai.openai.image.options.n | The number of images to generate. Must be between 1 and 10. For dall-e-3, only n=1 is supported. | -
109109
| spring.ai.openai.image.options.model | The model to use for image generation. | OpenAiImageApi.DEFAULT_IMAGE_MODEL
110110
| spring.ai.openai.image.options.quality | The quality of the image that will be generated. HD creates images with finer details and greater consistency across the image. This parameter is only supported for dall-e-3. | -
111-
| spring.ai.openai.image.options.response_format | The format in which the generated images are returned. Must be one of URL or b64_json. | -
112-
| `spring.ai.openai.image.options.size` | The size of the generated images. Must be one of 256x256, 512x512, or 1024x1024 for dall-e-2. Must be one of 1024x1024, 1792x1024, or 1024x1792 for dall-e-3 models. | -
111+
| `spring.ai.openai.image.options.response_format` | The format in which the generated images are returned. Must be one of URL or b64_json. This parameter isn't supported for gpt-image-1 which will always return base64-encoded images. | -
112+
| `spring.ai.openai.image.options.size` | The size of the generated images. Must be one of 256x256, 512x512, or 1024x1024 for dall-e-2. Must be one of 1024x1024, 1792x1024, or 1024x1792 for dall-e-3. Must be one of 1024x1024, 1536x1024 (landscape), 1024x1536 (portrait), or auto (default value) for gpt-image-1 | -
113113
| `spring.ai.openai.image.options.size_width` | The width of the generated images. Must be one of 256, 512, or 1024 for dall-e-2. | -
114114
| `spring.ai.openai.image.options.size_height`| The height of the generated images. Must be one of 256, 512, or 1024 for dall-e-2. | -
115115
| `spring.ai.openai.image.options.style` | The style of the generated images. Must be one of vivid or natural. Vivid causes the model to lean towards generating hyper-real and dramatic images. Natural causes the model to produce more natural, less hyper-real looking images. This parameter is only supported for dall-e-3. | -

0 commit comments

Comments
 (0)