API
API
Seedream 5.0 Pro API
ImageSeedream 5.0 Pro API supports text-to-image generation and editing with reference images, with flexible aspect ratios and 1K or 2K output.
Body
application/jsonmodelstringrequiredseedream-5-0-proinput.promptstringrequiredDescribe the image to create, or the changes to make to your reference images. Whitespace is trimmed.
input.imagesstring[]optionalOptional reference image URLs. Use publicly accessible HTTPS URLs only. Omit for text-to-image.
Maximum items: 16.
input.aspect_ratiostringoptionalOutput image width-to-height ratio. Defaults to 1:1.
Default: 1:1
input.resolutionstringoptionalOutput image resolution. Use lowercase 1k or 2k. Defaults to 1k.
Default: 1k
Request examples
POST /api/v1/createcurl -X POST https://nanobanana.io/api/v1/create \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"model": "seedream-5-0-pro",
"input": {
"prompt": "A cinematic product photo of a futuristic banana-shaped camera",
"aspect_ratio": "1:1",
"resolution": "1k"
}
}'POST /api/v1/create · HTTP 201{
"data": {
"task_id": "task_example",
"model": "seedream-5-0-pro",
"status": "processing",
"credits": 50
}
}Poll this endpoint using the returned task ID until the task is completed or failed. We recommend polling every 5 seconds to check the latest task status.
POST /api/v1/check{
"task_id": "task_example"
}Response
Task status returned by POST /api/v1/check. The IDs, URLs, and timestamps below are illustrative.
idstringrequiredTask identifier in data.id, matching the task_id used in the check request.
statusstringrequiredfailed_reasonstringoptionalOnly returned when status is failed, to explain the failure. This field is omitted for completed and processing.
Completed · completed
The download URLs are in data.data.results.
POST /api/v1/check · HTTP 200{
"data": {
"id": "task_example",
"created_at": 1791244800,
"model": "seedream-5-0-pro",
"status": "completed",
"data": {
"results": [
"https://example.com/generated.png"
],
"processing_time": 18
}
}
}Other statuses
For processing or failed, data.data is null. This example shows failed: only failed includes failed_reason. Continue polling for processing; stop polling for failed.
POST /api/v1/check · HTTP 200{
"data": {
"id": "task_example",
"created_at": 1791244800,
"model": "seedream-5-0-pro",
"status": "failed",
"data": null,
"failed_reason": "Generation failed."
}
}Credit usage
Credits consumed for a request generating one image.
| Resolution | 1K | 2K |
|---|---|---|
| Single image | 50 | 100 |
Optional parameters omitted: 50 credits
Set the listed input parameters explicitly to use the corresponding rate. Requests generating multiple images may consume more credits.
The credits field returned by POST /api/v1/create shows the amount charged for the task.
