Loading...
Nano Banana 2 API
Gemini 3.1 Flash native image generation with improved quality and advanced features including multi-subject reference and high-fidelity style transfer
Endpoint
POST https://api.hedra.com/v3/models/nano-banana-2
Example request
curl -X POST "https://api.hedra.com/v3/models/nano-banana-2" \
-H "Authorization: Key $HEDRA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input": {"prompt": "a cinematic shot of a city at dusk"}}'Parameters
- promptstringrequired
Generation prompt.
- num_outputsinteger
Number of outputs generated per job. Only 1 is supported.
- enhance_promptboolean
Rewrite the prompt before generation. An LLM expands it into a fuller description and the model receives that text instead of the submitted one; the result's `prompt` reports what ran.
- aspect_ratiostringrequired
Output aspect ratio.
- resolutionstringrequired
Output resolution.
- imagesarray
Images to edit or blend, at most 10 high-fidelity objects and 4 characters. 1 to 14 images, each at most 30 MB.
- seedinteger
Seed for reproducible output; omit for a random seed.