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 '{
  "callBackUrl": "https://example.com/callback",
  "image_size": "1:1",
  "output_format": "png",
  "prompt": "A surreal painting of a giant banana floating in space, stars and galaxies in the background, vibrant colors, digital art"
}'
{
  "task_id": "01234567-89ab-cdef-0123-456789abcdef"
}
Generate images from text descriptions using the Nano Banana model.

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

Maximum length: 5000
Example:

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

callBackUrl
string

Callback URL (optional) - Callback URL for task completion notification

Example:

"https://example.com/callback"

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"