POST
https://octopusx.ai
/
jm
Jimeng Official Format Query Task
curl --request POST \
  --url https://octopusx.ai/jm \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "req_key": "<string>",
  "task_id": "<string>",
  "req_json": "<string>"
}
'
{
  "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"
}

Jimeng Official Format Query Task

The task query API for Jimeng official format, used to query the status and result of image generation tasks.
  • The route entry is POST /jm.
  • Action and Version query parameters are required in the URL.
  • Specify the task to query through task_id in the Body.
  • Returns the task status (generating, success, failed) and image download URLs.

Method and Path

POST /jm?Action=CVSync2AsyncGetResult&Version=2022-08-31

Request Example

curl -X POST "https://octopusx.ai/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 Example

Generating

{
  "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"
}

Generation Successful

{
  "code": 10000,
  "data": {
    "binary_data_base64": [],
    "image_urls": [
      "https://example.com/generated-image-1.png",
      "https://example.com/generated-image-2.png"
    ],
    "status": "success"
  },
  "message": "Success",
  "request_id": "67fb9e82-126e-4c71-bb16-a3bb3789e3b7",
  "status": 10000,
  "time_elapsed": "2.5s"
}

Generation Failed

{
  "code": 10001,
  "data": {
    "binary_data_base64": [],
    "image_urls": null,
    "status": "failed"
  },
  "message": "Task failed",
  "request_id": "67fb9e82-126e-4c71-bb16-a3bb3789e3b7",
  "status": 10001,
  "time_elapsed": "1.2s"
}

Authentication

Authorization: Bearer YOUR_API_KEY

Query Parameters

Action
string
Operation type. Fixed value: CVSync2AsyncGetResult (query result).
Version
string
API version. Fixed value: 2022-08-31.

Body

req_key
string
required
Service identifier. Fixed value: jimeng_t2i_v40.
task_id
string
required
Task ID. The task_id returned when the task was created.
req_json
string
required
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}.

Response

code
integer
Status code. 10000 indicates success.
data
object
Response data container.
data.binary_data_base64
array
An array of Base64-encoded images.
data.image_urls
array | null
An array of image URLs. Returned when return_url: true is set in req_json.
data.status
string
Task status. Possible values: generating (generating), success (success), failed (failed).
message
string
Status message.
request_id
string
Request ID.
status
integer
Status code.
time_elapsed
string
Request duration.