Create a Seedream image task
Submit an asynchronous Seedream image task through CometAPI and store the returned task ID for polling.
POST /v1/images/generations with async: true to submit a Seedream image task without holding the HTTP connection open.
This asynchronous workflow applies to these model IDs:
/v1/models. For provider parameter details, see the BytePlus image generation API and Seedream 4.0-5.0 tutorial.
Submit the task
Sendmodel, prompt, and async: true. The example also requests a 2K URL response with watermark: false. Size support varies by model ID, so use a size supported by the selected model.
The create response returns data.task_id, data.status, and an empty data.data array while the task is pending. Store data.task_id; do not use the top-level response code as the task identifier.
Poll the task
Pass the stored task ID to Retrieve a Seedream image task. Continue polling whiledata.status is pending. Stop when it becomes success or failure.
Read the image URL
Authorizations
Bearer token authentication. Use your CometAPI key.
Body
Seedream model ID. This async workflow is documented for doubao-seedream-4-0-250828, doubao-seedream-4-5-251128, doubao-seedream-5-0-260128, and seedream-5-0-pro-260628. Query /v1/models or open the Models page for account availability.
"doubao-seedream-5-0-260128"
Text prompt describing the image to generate.
"A clean studio photograph of a small red ceramic teapot on a pale blue table, soft window light, no text."
Asynchronous task mode. Set this to true, store data.task_id, and poll the task endpoint.
Requested output size. Use a value supported by the selected model.
"2K"
Response workflow for this async request. The example uses url and retrieves the URL from the completed task.
"url"
Whether to request a visible watermark on the generated image.
false