Skip to main content
POST
cURL
HTTP bağlantısını açık tutmadan bir Seedream görüntü görevi göndermek için POST /v1/images/generations ile async: true kullanın. Bu eşzamansız iş akışı şu model kimlikleri için geçerlidir: Hesap kullanılabilirliği için şu sayfaya bakın: Models sayfası veya /v1/models sorgulayın. Sağlayıcı parametresi ayrıntıları için BytePlus görüntü oluşturma API’sine ve Seedream 4.0-5.0 eğitimine.

Görevi gönderme

model, prompt ve async: true gönderin. Örnek ayrıca 2K ile bir watermark: false URL yanıtı ister. Boyut desteği model kimliğine göre değişir; bu nedenle seçilen modelin desteklediği bir boyut kullanın. Oluşturma yanıtı, görev beklemedeyken data.task_id, data.status ve boş bir data.data dizisi döndürür. data.task_id saklayın; üst düzey yanıt kodunu görev tanımlayıcısı olarak kullanmayın.

Görevi yoklayın

Saklanan görev kimliğini şuna iletin: Seedream görüntü görevini alma. data.status değeri pending iken yoklamaya devam edin. success veya failure olduğunda durun.

Görüntü URL’sini okuyun

Bir görev başarıyla tamamlandığında, ayrıştırılmış JSON’dan data.data[0].url okuyun. Kabukta jq -r '.data.data[0].url', tam URL’deki özel karakterleri korur.Görüntüyü hemen indirin veya aktarın. URL geçicidir; bu belgeler sabit bir kullanım ömrü varsaymaz.

Yetkilendirmeler

Authorization
string
header
gerekli

Bearer token authentication. Use your CometAPI key.

Gövde

application/json
model
string
gerekli

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.

Örnek:

"doubao-seedream-5-0-260128"

prompt
string
gerekli

Text prompt describing the image to generate.

Örnek:

"A clean studio photograph of a small red ceramic teapot on a pale blue table, soft window light, no text."

async
boolean
gerekli

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.

Örnek:

"2K"

response_format
string

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

Örnek:

"url"

watermark
boolean

Whether to request a visible watermark on the generated image.

Örnek:

false

Yanıt

200 - application/json

Seedream asynchronous task submission response.

code
string
gerekli

Request status code. A successful submission returns success.

Örnek:

"success"

message
string
gerekli

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

data
object
gerekli
Son değiştirilme tarihi 31 Temmuz 2026