curl --request POST \
--url https://api.poyo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "seedream-5.0-flash",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "A colorful editorial poster for a neighborhood flower shop, with crisp typography and warm morning light",
"size": "3:4",
"resolution": "1.5K",
"output_format": "png"
}
}
'{
"code": 200,
"data": {
"task_id": "task-unified-1757165031-uyujaw3d",
"status": "not_started",
"created_time": "2026-10-08T10:30:00"
}
}{
"code": 400,
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"code": 400,
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}Seedream
Seedream-5.0-Flash
The Seedream 5.0 Flash API generates one image from text or edits 1 to 10 reference images. Resolution is 1K, 1.5K, or 2K.
POST
/
api
/
generate
/
submit
curl --request POST \
--url https://api.poyo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "seedream-5.0-flash",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "A colorful editorial poster for a neighborhood flower shop, with crisp typography and warm morning light",
"size": "3:4",
"resolution": "1.5K",
"output_format": "png"
}
}
'{
"code": 200,
"data": {
"task_id": "task-unified-1757165031-uyujaw3d",
"status": "not_started",
"created_time": "2026-10-08T10:30:00"
}
}{
"code": 400,
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"code": 400,
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}- After submission, a
task_idwill be returned. If you provided acallback_url, when the task status becomesfinishedorfailed, a POST request will be sent to thecallback_url. - Regardless of whether
callback_urlis provided, you can retrieve the result through the unified Query Task Status endpoint.
Models
- seedream-5.0-flash - Text-to-image generation
- seedream-5.0-flash-edit - Image editing with 1–10 reference images
Size
input.size controls the output aspect ratio. If omitted, the system uses 1:1:
- Ratio preset:
1:1,4:3,3:4,16:9,9:16,2:3,3:2,21:9
Resolution
input.resolution controls the output resolution. If omitted, the system uses 1K:
- Resolution preset:
1K,1.5K,2K
Examples
Use the unified submit endpoint:POST /api/generate/submit
Text-to-image example:
curl --request POST \
--url https://api.poyo.ai/api/generate/submit \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"model": "seedream-5.0-flash",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "A colorful editorial poster for a neighborhood flower shop, with crisp typography and warm morning light",
"size": "3:4",
"resolution": "1.5K",
"output_format": "png"
}
}'
curl --request POST \
--url https://api.poyo.ai/api/generate/submit \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"model": "seedream-5.0-flash-edit",
"input": {
"prompt": "Place the product from the second image on the table in the first image, preserving its shape and label",
"image_urls": [
"https://example.com/table.jpg",
"https://example.com/product.png"
],
"size": "4:3",
"resolution": "2K",
"enable_safety_checker": true
}
}'
Authorizations
All API endpoints require Bearer Token authentication.
Create an API key: sign in to PoYo, open Dashboard → API Key at poyo.ai/dashboard/api-key, and click to create a key.
Add it to the request header:
Authorization: Bearer YOUR_API_KEY
Body
application/json
Response
Task submitted successfully
Business status code. 200 means success; any other value means the request failed. Always check this field: some validation errors return HTTP 200 with code: 400 in the body.
200: Success400: Invalid request parameters401: Missing or invalid API key402: Insufficient credits403: Permission denied404: Resource not found408: Request timeout429: Rate limit exceeded500: Internal server error502: Upstream service error503: Service unavailable
See Error Codes for details.
Available options:
200, 400, 401, 402, 403, 404, 408, 429, 500, 502, 503 Example:
200