Skip to main content
The main function of the SeeDream Tasks API is to query the execution status of tasks by inputting the task ID generated by the SeeDream Images Generation API. This document will provide detailed integration instructions for the SeeDream Tasks API, helping you easily integrate and fully utilize the powerful features of this API. With the SeeDream Tasks API, you can easily query the execution status of tasks from the SeeDream Images Generation API.

Application Process

To use the SeeDream Tasks API, you first need to go to the application page SeeDream Images Generation API to apply for the corresponding service, and then copy the task ID from the SeeDream Images Generation API, as shown in the image below:

Finally, go to the Tasks API page SeeDream Tasks API to apply for the corresponding service. After entering the page, click the “Acquire” button, as shown in the image below: Application Page If you are not logged in or registered, you will be automatically redirected to the login page inviting you to register and log in. After logging in or registering, you will be automatically returned to the current page. There is a free quota available for first-time applicants, allowing you to use this API for free.

Request Example

The SeeDream Tasks API can be used to query the results of the SeeDream Images Generation API. For information on how to use the SeeDream Images Generation API, please refer to the documentation SeeDream Images Generation API. We will take a task ID returned by the SeeDream Images Generation API as an example to demonstrate how to use this API. Suppose we have a task ID: 20068983-0cc9-4c6a-aeb6-9c6a3c668be0, we will demonstrate how to pass in a task ID.

Task Example Image

Setting Request Headers and Request Body

Request Headers include:
  • accept: Specifies that the response should be in JSON format, set to application/json.
  • authorization: The key to call the API, which can be selected directly after application.
Request Body includes:
  • id: The uploaded task ID.
  • action: The operation method for the task.
Set as shown in the image below:

Code Example

It can be seen that various language codes have been automatically generated on the right side of the page, as shown in the image below:

Some code examples are as follows:

CURL

curl -X POST 'https://api.acedata.cloud/seedream/tasks' \
-H 'accept: application/json' \
-H 'authorization: Bearer {token}' \
-H 'content-type: application/json' \
-d '{
  "id": "a6e0d456-189b-4c78-9232-2fe72166ab39",
  "action": "retrieve"
}'

Response Example

After a successful request, the API will return the details of the task here. For example:
{
  "success": true,
  "task_id": "84d1544a-9043-4dde-a98b-e889dacd75f6",
  "trace_id": "176acf03-7ca7-4fc6-85db-e3724d4f59eb",
  "data": [
    {
      "prompt": "a white siamese cat",
      "size": "2048x2048",
      "image_url": "https://platform.cdn.acedata.cloud/seedream/6e5f9085-cc4a-4801-b77b-31550129ff19.jpg"
    }
  ]
}
The returned result contains multiple fields, described as follows:
  • success: The status of the video generation task at this time.
  • task_id: The ID of the video generation task at this time.
  • trace_id: The tracking ID of the video generation at this time.
  • data: The result list of the image generation task at this time.
    • image_url: The link to the image generation task at this time.
    • prompt: The prompt word.
    • size: The pixel size of the generated image.

Batch Query Operation

This is for querying the details of multiple task IDs, and unlike the above, the action needs to be selected as retrieve_batch. Request Body includes:
  • ids: The array of uploaded task IDs.
  • action: The operation method for the task.
Set as shown in the image below:

Code Example

Some code examples are as follows:

Response Example

After a successful request, the API will return the specific details of all batch tasks this time. For example:
{
  "items": [
    {
      "_id": "69498b9bff2676299c5cb7a6",
      "id": "84d1544a-9043-4dde-a98b-e889dacd75f6",
      "api_id": "86ad30f3-0bc8-4b9b-b019-b9fa5b05672e",
      "application_id": "11e25072-de6d-4bd6-81e7-77ee0055499a",
      "created_at": 1766427547.107,
      "credential_id": "50892af9-597f-426e-a455-bc1739de95b0",
      "request": {
        "action": "generate",
        "model": "doubao-seedream-4-0-250828",
        "prompt": "a white siamese cat"
      },
      "trace_id": "176acf03-7ca7-4fc6-85db-e3724d4f59eb",
      "type": "images",
      "user_id": "b60a9491-1eba-4ab8-a93f-12c0fd81dab4",
      "response": {
        "success": true,
        "task_id": "84d1544a-9043-4dde-a98b-e889dacd75f6",
        "trace_id": "176acf03-7ca7-4fc6-85db-e3724d4f59eb",
        "data": [
          {
            "prompt": "a white siamese cat",
            "size": "2048x2048",
            "image_url": "https://platform.cdn.acedata.cloud/seedream/6e5f9085-cc4a-4801-b77b-31550129ff19.jpg"
          }
        ]
      }
    },
    {
      "_id": "69498b9bff2676299c5cb7a6",
      "id": "84d1544a-9043-4dde-a98b-e889dacd75f6",
      "api_id": "86ad30f3-0bc8-4b9b-b019-b9fa5b05672e",
      "application_id": "11e25072-de6d-4bd6-81e7-77ee0055499a",
      "created_at": 1766427547.107,
      "credential_id": "50892af9-597f-426e-a455-bc1739de95b0",
      "request": {
        "action": "generate",
        "model": "doubao-seedream-4-0-250828",
        "prompt": "a white siamese cat"
      },
      "trace_id": "176acf03-7ca7-4fc6-85db-e3724d4f59eb",
      "type": "images",
      "user_id": "b60a9491-1eba-4ab8-a93f-12c0fd81dab4",
      "response": {
        "success": true,
        "task_id": "84d1544a-9043-4dde-a98b-e889dacd75f6",
        "trace_id": "176acf03-7ca7-4fc6-85db-e3724d4f59eb",
        "data": [
          {
            "prompt": "a white siamese cat",
            "size": "2048x2048",
            "image_url": "https://platform.cdn.acedata.cloud/seedream/6e5f9085-cc4a-4801-b77b-31550129ff19.jpg"
          }
        ]
      }
    }
  ],
  "count": 2
}
The returned result contains multiple fields, among which items include the specific details of batch tasks, and the specific information of each task is the same as the fields in the previous single task query result, with the following field information.
  • items, all specific detail information of the batch task. It is an array, and each element of the array has the same format as the previous single task query result.
  • count, the number of batch query tasks.

CURL

curl -X POST 'https://api.acedata.cloud/seedance/tasks' \
-H 'accept: application/json' \
-H 'authorization: Bearer {token}' \
-H 'content-type: application/json' \
-d '{
  "ids": ["84d1544a-9043-4dde-a98b-e889dacd75f6","84d1544a-9043-4dde-a98b-e889dacd75f6"],
  "action": "retrieve_batch"
}'

Error Handling

When calling the API, if an error occurs, the API will return the corresponding error code and message. For example:
  • 400 token_mismatched: Bad request, possibly due to missing or invalid parameters.
  • 400 api_not_implemented: Bad request, possibly due to missing or invalid parameters.
  • 401 invalid_token: Unauthorized, invalid or missing authorization token.
  • 429 too_many_requests: Too many requests, you have exceeded the rate limit.
  • 500 api_error: Internal server error, something went wrong on the server.

Error Response Example

{
  "success": false,
  "error": {
    "code": "api_error",
    "message": "fetch failed"
  },
  "trace_id": "2cf86e86-22a4-46e1-ac2f-032c0f2a4e89"
}

Conclusion

Through this document, you have learned how to use the SeeDream Tasks API to query the specific detail information of single or batch tasks. We hope this document can help you better integrate and use the API. If you have any questions, please feel free to contact our technical support team.