GeminiText to imageAvailable now

gemini-nano-banana-2.1

gemini-nano-banana-2.1 is a text to image tool from Gemini that runs in the background and returns images. Pay as you go from $0.00000195 per token, with one API key.

Try itfrom $0.00000195 / token

Pricing

Up to $1.533543 per run at the default inputs. $1.95 per 1M input tokens, $39.00 per 1M image output tokens, $9.75 per 1M text output tokens. The final charge comes from usage.

Limits

Runs
In the background
Returns
image
Longest queue wait
3600s
Run deadline
1800s
Largest inline input
1024 KB
Largest input file
500 MB
Largest output
4768 MB
Outputs per run
16

Input

FieldKindDefaultDescription
contents requiredJSON—The content of the current conversation with the model.
toolsJSON—Grounding with Google Search, the only tool this model takes (web and image search). Set generationConfig.responseModalities to ["TEXT", "IMAGE"]. Every search query the model runs is billed.
generationConfigJSON—Configuration options for model generation and outputs.
systemInstructionJSON—Developer set [system instruction(s)](https://ai.google.dev/gemini-api/docs/system-instructions).

Same request in code

curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "gemini",
    "model": "gemini-nano-banana-2.1",
    "input": {
      "contents": {}
    }
  }'