Jimeng Official Format Query Task
Use `POST /jm` to query the status and result of Jimeng official format tasks.
https://zx1.deepwl.net/jmcurl -X POST "https://zx1.deepwl.net/jm?Action=CVSync2AsyncGetResult&Version=2022-08-31" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '
{
"req_key": "jimeng_t2i_v40",
"task_id": "67fb9e82-126e-4c71-bb16-a3bb3789e3b7",
"req_json": "{\"return_url\": true}"
}'{
"code": 10000,
"data": {
"binary_data_base64": [],
"image_urls": null,
"status": "generating"
},
"message": "Success",
"request_id": "67fb9e82-126e-4c71-bb16-a3bb3789e3b7",
"status": 10000,
"time_elapsed": "35.381µs"
}The task query API for Jimeng official format, used to query the status and result of image generation tasks. The Action and Version query parameters are required in the URL, and the task to query is specified through task_id in the Body. Returns the task status (generating, success, failed) and image download URLs.
Request Headers
Authorizationstring必填Authentication header. Uses a Bearer token, e.g. Bearer YOUR_API_KEY.
Content-Typestring必填Request content type, must be application/json.
Query Parameters
ActionstringOperation type. Fixed value: CVSync2AsyncGetResult (query result).
VersionstringAPI version. Fixed value: 2022-08-31.
Request Body
req_keystring必填Service identifier. Fixed value: jimeng_t2i_v40.
task_idstring必填Task ID. The task_id returned when the task was created.
req_jsonstring必填A JSON-serialized string. Currently supports watermark configuration and whether to return image links; this can be added in the response result. For example: {"return_url": true}.
Request Examples
Response Examples
Response Fields
codeintegerStatus code. 10000 indicates success.
dataobjectResponse data container.
binary_data_base64arrayAn array of Base64-encoded images.
image_urlsarray | nullAn array of image URLs. Returned when return_url: true is set in req_json.
statusstringTask status. Possible values: generating (generating), success (success), failed (failed).
messagestringStatus message.
request_idstringRequest ID.
statusintegerStatus code.
time_elapsedstringRequest duration.