Braily AI API
APIИзображения

Seedream 4.0

Модель ByteDance для генерации и редактирования изображений.

Seedream 4.0 поддерживает text-to-image и image-to-image, а также выбор пропорции и качества результата.

POST https://braily.ru/api/v1/images/generations

Параметры

ПараметрЗначенияПо умолчанию
modelseedream-v4-
promptОт 3 до 5000 символов-
image_referenceОт 1 до 1 media_id для image-to-image-
parameters.aspect_ratio1:1, 3:4, 9:16, 4:3, 16:91:1
parameters.resolution1K, 2K, 4K1K

Стоимость

Токены
10

Пример запроса

curl "https://braily.ru/api/v1/images/generations" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "seedream-v4",
    "prompt": "A bright editorial food photo of a matcha dessert on ceramic plate",
    "parameters": {
      "aspect_ratio": "4:3",
      "resolution": "1K"
    }
  }'
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-v4",
    prompt:
      "A bright editorial food photo of a matcha dessert on ceramic plate",
    parameters: {
      aspect_ratio: "4:3",
      resolution: "1K",
    },
  }),
});

const task = await response.json();

Image-to-image

{
  "model": "seedream-v4",
  "prompt": "Preserve the object and create a warmer lifestyle scene",
  "image_reference": ["media_123"],
  "parameters": {
    "aspect_ratio": "4:3"
  }
}

Ответ 202 Accepted

{
  "data": {
    "task_id": "task_123",
    "status": "CREATED",
    "cost": 10,
    "generated": []
  }
}

На этой странице