Class OpenAiImageApi
java.lang.Object
org.springframework.ai.openai.api.OpenAiImageApi
OpenAI Image API.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final record
static final record
static final record
-
Field Summary
-
Constructor Summary
ConstructorDescriptionOpenAiImageApi
(String openAiToken) Create a new OpenAI Image api with base URL set to https://api.openai.comOpenAiImageApi
(String baseUrl, String openAiToken, org.springframework.web.client.RestClient.Builder restClientBuilder) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity
<OpenAiImageApi.OpenAiImageResponse> createImage
(OpenAiImageApi.OpenAiImageRequest openAiImageRequest)
-
Field Details
-
DEFAULT_IMAGE_MODEL
- See Also:
-
-
Constructor Details
-
OpenAiImageApi
Create a new OpenAI Image api with base URL set to https://api.openai.com- Parameters:
openAiToken
- OpenAI apiKey.
-
OpenAiImageApi
-
-
Method Details
-
createImage
public org.springframework.http.ResponseEntity<OpenAiImageApi.OpenAiImageResponse> createImage(OpenAiImageApi.OpenAiImageRequest openAiImageRequest)
-