Aidge Resource
Try for freeWorkplace
  • LATEST ADVANCEMENTS
    • Introducing Marco-MT: Bringing Translation to the Next Level with LLM
  • GETTING STARTED
    • Quick Start
    • Account and Authentication
    • Your First API Request
    • Test Your API Requests
    • Service Level Agreement
    • FAQ
  • API REFERENCE
    • E-commerce Information Translation
      • Marco Translator
        • Marco Translator API Reference
      • Image Translation
        • Image Translation Pro Version API Reference
        • Image Translation Pro Version Result API Call Description
        • Image Translation Standard Version API Reference
    • E-commerce Image Editing
      • Image Background Removal
        • Image Background Removal API Reference
      • Image Upscaling
        • Image Upscaling API Reference
      • Image Cropping
        • Image Cropping API Reference
      • Image Elements Removal
        • Image Elements Removal API Reference
      • Image Elements Detection
        • Image Elements Detection Submit API Reference
        • Image Elements Detection Query API Reference
    • E-commerce Virtual Model
      • Virtual Model Alternation
        • Virtual Model Alternation Submit API Reference
        • Virtual Model Alternation Result Query API Reference
      • Virtual TryOn
        • Virtual Try-on Submit API Reference
        • Virtual Try-On Query API Reference
        • General Model Library Reference
      • Hands&Feet Repair
        • Hands&Feet Repair Submit API Reference
        • Hands&Feet Repair Query API Reference
    • Editor Documentation
      • AI Model Editor
      • AI Image Editor
        • Image Workbench
        • Background Removal
        • Elements Removal
        • Image Translation
Powered by GitBook
On this page
  • Image Background Generation Query
  • Request Parameters
  • Sample Request
  • Response Parameters
  • Sample Response
  • Errors

Was this helpful?

  1. API REFERENCE
  2. E-commerce Image Editing
  3. Image Background Generation

Image Background Generation Query API Reference

Image Background Generation Query

GET/POST /ai/image/background/generation/query

Using the taskID obtained from the Background Generation Submit API, you can call this API to query the results of the background-generated images.

Request Parameters

Parameter
Type
Required
Description
explanation

taskId

String

Yes

The unique task ID. You can query the corresponding generation results using the task ID.

Unique task ID. Query the corresponding generation results based on the task ID.

Sample Request

IopClient client = new IopClient(url, appkey, appSecret);
IopRequest request = new IopRequest();
request.setApiName("/ai/image/background/generation/query");
request.addApiParameter("taskId", "7xxxxxxx-2xxx-4xxx-8xxx-8xxxxxxxxxxx");
IopResponse response = client.execute(request);
System.out.println(response.getBody());
Thread.sleep(10);

Response Parameters

Parameter
Type
Description

resCode

Number

The returned result code, where 200 indicates success. For detailed error codes, please refer to the error code list.

data

Object

The returned JSON result data.

taskMessage

String

The returned task information.

taskId

String

A unique task ID. It is used for subsequent result query requests.

taskStatus

String

Return the status of task execution.

taskResult

Object[]

Return the task results.

imageUrlList

Object[]

Return the list of URLs for the result images.

sceneTemplate

String

Return the scene template.

recordContent

String

Return the record content.

taskStatus

String

Return the task status.

taskMessage

String

Return the task message.

requestId

String

A unique request ID used for troubleshooting.

success

Boolean

The status of the returned request, indicating whether the request was successful.

resMessage

String

The returned request information.

Sample Response

{
  "data": {
    "taskResult": [
      {
        "imageUrlList": [
          "https://aibz-aigc-record.oss-ap-southeast-1.aliyuncs.com/pbg_result%2FMvRJHuDgDF%2FMvRJHuDgDF_3925947387.png?OSSAccessKeyId=LTAI5tAGoBnm5eYsnZ5E1zMr&Expires=4935975567&Signature=29Go0D26nksBs4K8JY0GJ4vHwUU%3D",
          "https://aibz-aigc-record.oss-ap-southeast-1.aliyuncs.com/pbg_result%2FMvRJHuDgDF%2FMvRJHuDgDF_3925947388.png?OSSAccessKeyId=LTAI5tAGoBnm5eYsnZ5E1zMr&Expires=4935975567&Signature=msIPWuZt1j8H0QVzVzZXbAk2VUM%3D"
        ],
        "taskStatus": "finished"
      }
    ],
    "taskId": "713f0cb3-f22f-490b-b3b7-3684f73bf2d6",
    "taskStatus": "finished"
  },
  "requestId": "210133e517193035913164122eaa87",
  "success": true,
  "resCode": 200,
  "resMessage": "success",
  "code": "0",
  "request_id": "2101725817193035913182132",
  "_trace_id_": "210133e517193035913164122eaa87"
}

Errors

Error Code
Error Message
Description

500

system error

System error.

501

rate limit exceed

The current interface has reached the current limit. Please contact us via navigation bar or email us (aidge_support@service.alibaba.com) to increase the current limit value.

700

invalid input

The format of the input parameters does not meet the requirements, and resMessage will return detailed fields that do not meet the requirements.

801

model failed

Internal call exception, please contact us via navigation bar or email us (aidge_support@service.alibaba.com) for troubleshooting.

1000

content has sensitive data, please try other input

Content has sensitive data and cannot be handled now. Please try other input.

1001

content control failed, please retry

Content risk failed, please try other input. If an error persists,please contact us via navigation bar or email us (aidge_support@service.alibaba.com) for troubleshooting.

1002

content risk filter failed, please contact us

Content risk failed, please contact us via navigation bar or email us (aidge_support@service.alibaba.com).

Last updated 10 months ago

Was this helpful?