Skip to main content
POST
/
generate
/
k
/
nano-banana
Nano Banana Image Generation
curl --request POST \
  --url https://api.sinancode.com/v1/generate/k/nano-banana \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "A surreal painting of a giant banana floating in space, stars and galaxies in the background, vibrant colors, digital art",
  "image_size": "1:1",
  "output_format": "png"
}
'
{
  "task_id": "01234567-89ab-cdef-0123-456789abcdef"
}
Generate images from text using Google DeepMind’s Nano Banana (Gemini 2.5 Flash) model. Key Features:
  • Fast Generation - Built on Gemini 2.5 Flash for quick image generation
  • Cost-Effective - Lower cost, suitable for batch generation scenarios
  • 1K Resolution - Supports up to 1024x1024 pixel output
  • Strong Understanding - Inherits Gemini’s semantic understanding and reasoning capabilities

Authorizations

Authorization
string
header
required

Please use your API Token for authentication

Body

application/json

Task parameters

prompt
string
required

Prompt (required, max 5000 characters) - Text description for image generation

Required string length: 1 - 5000
Example:

"A surreal painting of a giant banana floating in space, stars and galaxies in the background, vibrant colors, digital art"

image_size
enum<string>
default:1:1

Image size (optional, default 1:1) - Image aspect ratio

Available options:
1:1,
9:16,
16:9,
3:4,
4:3,
3:2,
2:3,
5:4,
4:5,
21:9,
auto
Example:

"1:1"

output_format
enum<string>

Output format (optional) - Image output format

Available options:
png,
jpeg
Example:

"png"

Response

OK

task_id
string
required

Task ID

Example:

"01234567-89ab-cdef-0123-456789abcdef"