Nano Banana 2.1
Generates images from a text prompt.
| Model ID | nano-banana-2.1 |
| Task | text-to-image |
| Output | image |
| Family | Nano Banana |
| Status | Active |
Prices are live, so this page does not show them. GET /v1/models/nano-banana-2.1 returns the published price (price), and POST /v1/quotes returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See Pricing and quotes.
Parameters
Section titled “Parameters”Send these in input. Omitted parameters take their default; unknown parameters are refused with 422 parameter_unknown. The same schema is input_schema in GET /v1/models/nano-banana-2.1.
| Name | Type | Default | Allowed | Required | Description |
|---|---|---|---|---|---|
prompt |
string | 1 to 50000 characters | Yes | Describe the image: subject, setting, style, light and any text it should show. | |
aspect_ratio |
string | 1:1 |
14 values, listed below | No | Frame shape of the image. |
size |
string | 1K |
1K, 2K, 4K |
No | Output size. 4K costs more. |
count |
integer | 1 |
1 to 4 | No | How many images to make. Each one is charged. |
thinking |
string | medium |
minimal, medium, high |
No | More reasoning helps with dense layouts and text; it takes longer and High costs a little more. |
seed |
integer | 0 |
0 to 2147483647 | No | The same seed with the same settings gives a similar result. Omit it for a random seed. |
aspect_ratio values
Section titled “aspect_ratio values”1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 21:9, 4:5, 5:4, 4:1, 1:4, 8:1, 1:8
Example
Section titled “Example”Price the request first. A quote is free and starts nothing:
curl https://api.halationlab.ai/v1/quotes \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d @- <<'JSON'{ "model": "nano-banana-2.1", "input": { "prompt": "A studio photo of a red ceramic mug on a linen tablecloth, soft window light", "aspect_ratio": "1:1" }}JSONThen start it, paying at most MAX_COST tokens. If the price is higher, nothing starts and the 402 max_cost_exceeded answer carries the quote:
MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens}curl https://api.halationlab.ai/v1/generations \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- <<JSON{ "model": "nano-banana-2.1", "input": { "prompt": "A studio photo of a red ceramic mug on a linen tablecloth, soft window light", "aspect_ratio": "1:1" }, "max_cost": $MAX_COST}JSON