Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/v1/generateTask/seedream-4-5 | Создание задачи генерации |
| GET | /api/v1/statusTask/seedream-4-5 | Запрос статуса задачи |
Authentication
Все запросы требуют API Key в заголовке:Request Body
Parameters
async (polling) или callback (webhook)
Callback URL, обязателен при request_type=callback (условно)
Стратегия маршрутизации: auto, value или official
Параметры входа модели
text-to-image— Generate from text descriptionimage-to-image— Generate with reference images
disabled— Generate independent images, no relation between themauto— Model decides whether to generate sequential/related images based onmax_images
Example
Text-to-ImageResponse
POST /api/v1/generateTask/seedream-4-5
При успехе возвращает taskId для последующих запросов статуса. Success:GET /api/v1/statusTask/seedream-4-5
Запрос статуса выполнения задачи и результатов по taskId.Status Response Fields
Уникальный идентификатор задачи.
Текущее состояние задачи: pending, processing, success или failed.
JSON-строка с массивом resultUrls. Присутствует только при success. Парсите через JSON.parse().
Код ошибки. Присутствует только при state=failed. См. Error Codes.
Читаемое сообщение об ошибке. Присутствует только при state=failed.
Timestamp создания задачи (Unix миллисекунды).
Timestamp завершения задачи (Unix миллисекунды).
Длительность обработки в миллисекундах.
Error Codes
| Code | Description |
|---|---|
| 400 | Неверные параметры или ошибка запроса |
| 401 | Недействительный или отсутствующий API Key |
| 429 | Превышен лимит запросов |
| Fail Code | Description |
|---|---|
CONTENT_VIOLATION | Контент нарушает правила безопасности |
INVALID_IMAGE_URL | Не удаётся получить доступ к URL изображения |
Rate Limits
| Limit | Value |
|---|---|
| Requests | 10000 / minute |
| Concurrent tasks | 1000 |
Tips
- Generation time:
- 2K resolution: ~25-35 seconds
- 4K resolution: ~40-55 seconds
- Submit task, wait 20 seconds, then poll every 3 seconds
- Callback mode: For high-concurrency or high-resolution generation, use
callbackmode. - Image expiration: Result URLs are valid for 15 days. Download and store important outputs promptly.
- Content moderation: Prompts must comply with content safety guidelines. Violations return
CONTENT_VIOLATION. - High resolution: Supports up to 4K output, ideal for high-quality printing and professional use.
- Batch generation:
max_imagessupports 1-10, generate multiple candidates at once, billed per image. - Sequential images:
disabled: Generate independent images, no relationauto: Intelligently generate sequential images with continuity and coherence- Sequential mode is ideal for storyboards, comic panels, etc.
- Multiple reference fusion:
image-to-imagemode supports up to 14 reference images- Model intelligently combines style, composition, and color
- More references = richer fusion effects
- Resolution selection:
2K: Balanced quality and speed, for most scenarios4K: Highest quality, for professional creation and printing
- Aspect ratio suggestions:
16:9/21:9: Landscape, for banners and desktop wallpapers9:16: Portrait, for mobile wallpapers and short video covers1:1: Square, for social media
- Image formats:
image_urlssupports JPG, PNG, WebP, max 10MB per image.