Seedream görüntü görevi oluşturma
CometAPI aracılığıyla eşzamansız bir Seedream görüntü görevi gönderin ve yoklama için döndürülen görev kimliğini saklayın.
POST /v1/images/generations ile async: true kullanın.
Bu eşzamansız iş akışı şu model kimlikleri için geçerlidir:
/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
Yetkilendirmeler
Bearer token authentication. Use your CometAPI key.
Gövde
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