APIИзображения
Seedream 5.0 Pro
Профессиональная модель ByteDance для генерации и редактирования изображений.
Seedream 5.0 Pro поддерживает text-to-image и image-to-image, выбор пропорции, качества и формата результата.
POST https://braily.ru/api/v1/images/generationsПараметры
| Параметр | Значения | По умолчанию |
|---|---|---|
model | seedream-v5-pro | - |
prompt | От 3 до 5000 символов | - |
image_reference | От 1 до 10 media_id для image-to-image | - |
parameters.aspect_ratio | 1:1, 4:3, 3:4, 16:9, 9:16, 2:3, 3:2, 21:9 | 1:1 |
parameters.resolution | 1K, 2K | 1K |
Стоимость
| Разрешение | Токены |
|---|---|
1K | 25 |
2K | 50 |
Пример запроса
curl "https://braily.ru/api/v1/images/generations" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seedream-v5-pro",
"prompt": "A cinematic editorial portrait in warm afternoon light",
"parameters": {
"aspect_ratio": "4:3",
"resolution": "2K"
}
}'const response = await fetch("https://braily.ru/api/v1/images/generations", {
method: "POST",
headers: {
Authorization: `Bearer ${API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "seedream-v5-pro",
prompt: "A cinematic editorial portrait in warm afternoon light",
parameters: {
aspect_ratio: "4:3",
resolution: "2K"
},
}),
});
const task = await response.json();Image-to-image
{
"model": "seedream-v5-pro",
"prompt": "Keep the subject and create a clean studio background",
"image_reference": ["media_123"],
"parameters": {
"aspect_ratio": "4:3",
"resolution": "1K"
}
}Ответ 202 Accepted
{
"data": {
"task_id": "task_123",
"status": "CREATED",
"cost": 25,
"generated": []
}
}