Class DashScopeImageApi
java.lang.Object
com.alibaba.cloud.ai.dashscope.api.DashScopeImageApi
DashScope image generation API client.
Model-to-path mapping (see Aliyun Bailian API docs):
- "/api/v1/services/aigc/multimodal-generation/generation": qwen-image*, z-image*, qwen-image-edit* (Qwen text-to-image/edit, Z-Image, Wanx 2.6 sync)
- "/api/v1/services/aigc/image-generation/generation": wan2.6-image (Wanx 2.6 async)
- "/api/v1/services/aigc/text2image/image-synthesis": wan2.5-t2i-preview, wan2.2-t2i-*, wanx2.1-t2i-*, wanx2.0-t2i-turbo, wanx-v1 (Wanx text-to-image V2 legacy)
- "/api/v1/services/aigc/image2image/image-synthesis": qwen-mt-image (Qwen image translation)
- Author:
- nuocheng.lxm, yuluo-yx, Soryu
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDashScopeImageApi(String baseUrl, org.springframework.ai.model.ApiKey apiKey, String imagesPath, String queryTaskPath, String workSpaceId, org.springframework.web.client.RestClient.Builder restClientBuilder, org.springframework.web.client.ResponseErrorHandler responseErrorHandler) -
Method Summary
Modifier and TypeMethodDescriptionstatic DashScopeImageApi.Builderbuilder()clone()org.springframework.http.ResponseEntity<DashScopeApiSpec.DashScopeImageAsyncResponse>getImageGenTaskResult(String taskId) mutate()Returns a builder pre-populated with the current configuration for mutation.org.springframework.http.ResponseEntity<DashScopeApiSpec.DashScopeImageAsyncResponse>
-
Field Details
-
DEFAULT_IMAGE_MODEL
-
-
Constructor Details
-
DashScopeImageApi
-
-
Method Details
-
clone
-
mutate
Returns a builder pre-populated with the current configuration for mutation. -
builder
-
submitImageGenTask
public org.springframework.http.ResponseEntity<DashScopeApiSpec.DashScopeImageAsyncResponse> submitImageGenTask(DashScopeApiSpec.DashScopeImageRequest request) -
getImageGenTaskResult
public org.springframework.http.ResponseEntity<DashScopeApiSpec.DashScopeImageAsyncResponse> getImageGenTaskResult(String taskId)
-