Skip to main content
POST
cURL
HTTP 接続を開いたままにせずに Seedream 画像タスクを送信するには、POST /v1/images/generationsasync: true とともに使用します。 この非同期ワークフローは、次のモデル ID に適用されます。 アカウントで利用可能かどうかについては、 モデルページ を参照するか、/v1/models を照会してください。プロバイダーのパラメータの詳細については、BytePlus の 画像生成 API および Seedream 4.0-5.0 チュートリアル.

タスクを送信

modelpromptasync: true を送信します。例では、2K URL レスポンスを watermark: false でリクエストします。サイズのサポートはモデル ID ごとに異なるため、選択したモデルでサポートされるサイズを使用してください。 作成レスポンスでは data.task_iddata.status、および空の data.data 配列が返されます。タスクが保留中の場合は data.task_id を保存してください。最上位のレスポンスコードをタスク識別子として使用しないでください。

タスクをポーリング

保存したタスク ID を Seedream 画像タスクを取得に渡します。data.statuspending である間はポーリングを続けます。success または failure になったら停止します。

画像 URL を読み取る

タスクが成功したら、解析済み JSON から data.data[0].url を読み取ります。シェルでは、jq -r '.data.data[0].url' により完全な URL 内の特殊文字が保持されます。画像は速やかにダウンロードまたは転送してください。URL は一時的なものであり、このドキュメントでは固定の有効期間を想定していません。

承認

Authorization
string
header
必須

Bearer token authentication. Use your CometAPI key.

ボディ

application/json
model
string
必須

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"

prompt
string
必須

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."

async
boolean
必須

Asynchronous task mode. Set this to true, store data.task_id, and poll the task endpoint.

size
string

Requested output size. Use a value supported by the selected model.

:

"2K"

response_format
string

Response workflow for this async request. The example uses url and retrieves the URL from the completed task.

:

"url"

watermark
boolean

Whether to request a visible watermark on the generated image.

:

false

レスポンス

200 - application/json

Seedream asynchronous task submission response.

code
string
必須

Request status code. A successful submission returns success.

:

"success"

message
string
必須

Status message. A successful submission can return an empty string.

data
object
必須
最終更新日 2026年7月31日