Class ZhiPuAiImageApi
java.lang.Object
org.springframework.ai.zhipuai.api.ZhiPuAiImageApi
ZhiPuAI Image API.
- Since:
- 1.0.0 M1
- Author:
- Geng Rong
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic enumZhiPuAI Image API model.static final recordstatic final record -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionZhiPuAiImageApi(String zhiPuAiToken) Create a new ZhiPuAI Image api with base URL set tohttps://open.bigmodel.cn/api/paas.ZhiPuAiImageApi(String baseUrl, String zhiPuAiToken, org.springframework.web.client.RestClient.Builder restClientBuilder) Create a new ZhiPuAI Image API with the provided base URL.ZhiPuAiImageApi(String baseUrl, String zhiPuAiToken, org.springframework.web.client.RestClient.Builder restClientBuilder, org.springframework.web.client.ResponseErrorHandler responseErrorHandler) Create a new ZhiPuAI Image API with the provided base URL. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<ZhiPuAiImageApi.ZhiPuAiImageResponse> createImage(ZhiPuAiImageApi.ZhiPuAiImageRequest zhiPuAiImageRequest)
-
Field Details
-
DEFAULT_IMAGE_MODEL
-
-
Constructor Details
-
ZhiPuAiImageApi
Create a new ZhiPuAI Image api with base URL set tohttps://open.bigmodel.cn/api/paas.- Parameters:
zhiPuAiToken- ZhiPuAI apiKey.
-
ZhiPuAiImageApi
public ZhiPuAiImageApi(String baseUrl, String zhiPuAiToken, org.springframework.web.client.RestClient.Builder restClientBuilder) Create a new ZhiPuAI Image API with the provided base URL.- Parameters:
baseUrl- the base URL for the ZhiPuAI API.zhiPuAiToken- ZhiPuAI apiKey.restClientBuilder- the rest client builder to use.
-
ZhiPuAiImageApi
public ZhiPuAiImageApi(String baseUrl, String zhiPuAiToken, org.springframework.web.client.RestClient.Builder restClientBuilder, org.springframework.web.client.ResponseErrorHandler responseErrorHandler) Create a new ZhiPuAI Image API with the provided base URL.- Parameters:
baseUrl- the base URL for the ZhiPuAI API.zhiPuAiToken- ZhiPuAI apiKey.restClientBuilder- the rest client builder to use.responseErrorHandler- the response error handler to use.
-
-
Method Details
-
createImage
public org.springframework.http.ResponseEntity<ZhiPuAiImageApi.ZhiPuAiImageResponse> createImage(ZhiPuAiImageApi.ZhiPuAiImageRequest zhiPuAiImageRequest)
-