Jimeng Image

Jimeng Official Format Query Task

Use `POST /jm` to query the status and result of Jimeng official format tasks.

POSThttps://zx1.deepwl.net/jm
Request
curl -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}"
}'
Response
{
  "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

Actionstring

Operation type. Fixed value: CVSync2AsyncGetResult (query result).

Versionstring

API 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

codeinteger

Status code. 10000 indicates success.

dataobject

Response data container.

binary_data_base64array

An array of Base64-encoded images.

image_urlsarray | null

An array of image URLs. Returned when return_url: true is set in req_json.

statusstring

Task status. Possible values: generating (generating), success (success), failed (failed).

messagestring

Status message.

request_idstring

Request ID.

statusinteger

Status code.

time_elapsedstring

Request duration.