Class StabilityAiImageClient
java.lang.Object
org.springframework.ai.stabilityai.StabilityAiImageClient
- All Implemented Interfaces:
ImageClient
,ModelClient<ImagePrompt,
ImageResponse>
StabilityAiImageClient is a class that implements the ImageClient interface. It
provides a client for calling the StabilityAI image generation API.
-
Constructor Summary
ConstructorDescriptionStabilityAiImageClient
(StabilityAiApi stabilityAiApi) StabilityAiImageClient
(StabilityAiApi stabilityAiApi, StabilityAiImageOptions options) -
Method Summary
Modifier and TypeMethodDescriptioncall
(ImagePrompt imagePrompt) Calls the StabilityAiImageClient with the given StabilityAiImagePrompt and returns the ImageResponse.
-
Constructor Details
-
StabilityAiImageClient
-
StabilityAiImageClient
-
-
Method Details
-
getOptions
-
call
Calls the StabilityAiImageClient with the given StabilityAiImagePrompt and returns the ImageResponse. This overloaded call method lets you pass the full set of Prompt instructions that StabilityAI supports.- Specified by:
call
in interfaceImageClient
- Specified by:
call
in interfaceModelClient<ImagePrompt,
ImageResponse> - Parameters:
imagePrompt
- the StabilityAiImagePrompt containing the prompt and image model options- Returns:
- the ImageResponse generated by the StabilityAiImageClient
-