Google AI (Gemini API)BildgenerierungAI generation

Google: Gemini 3.1 Flash Lite Image (Nano Banana 2 Lite)

google-ai.image-gen.gemini-3-1-flash-lite-image

Generate or edit one 1K image with Gemini 3.1 Flash Lite Image on Google's own API, the cheapest Gemini image model; the image returns inline as base64.

Price
$0.04/successZum Anbieterpreis
Success rate
96,6 %Last 30 days · 356 calls
Latency p50
3 sp95 7.4 s
Last verified
30.09.2026Verified working
POSThttps://toolswitch.dev/v1/tools/google-ai.image-gen.gemini-3-1-flash-lite-image?fields=candidates%28content%28parts%28text%2CinlineData%29%29%2CfinishReason%29%2CusageMetadata%2CmodelVersion%2CresponseId%2CpromptFeedbackPreview
  • Uses platform quota
  • Synchronous response
  • Reads public data

Parameter

ParameterTypErforderlichBeschreibungBeispiel
Pfadparameter
modelZeichenketteErforderlichgemini-3.1-flash-lite-image is the stable model; the -preview alias is the same model at the same price.gemini-3.1-flash-lite-image
Abfrageparameter
fieldsZeichenketteOptionalGoogle's partial-response mask; the example drops the multi-megabyte thoughtSignature. Keep usageMetadata in any mask you send.candidates(content(parts(text,inlineData)),finishReason),usageMetadata,modelVersion,responseId,promptFeedback
  • Pfadparameter
  • modelZeichenketteErforderlich

    gemini-3.1-flash-lite-image is the stable model; the -preview alias is the same model at the same price.

    Beispiel: gemini-3.1-flash-lite-image

  • Abfrageparameter
  • fieldsZeichenketteOptional

    Google's partial-response mask; the example drops the multi-megabyte thoughtSignature. Keep usageMetadata in any mask you send.

    Beispiel: candidates(content(parts(text,inlineData)),finishReason),usageMetadata,modelVersion,responseId,promptFeedback

Codebeispiele

Ersetze $TOOLSWITCH_KEY durch den in der Konsole erstellten Schlüssel.

Preview
curl -X POST 'https://toolswitch.dev/v1/tools/google-ai.image-gen.gemini-3-1-flash-lite-image?fields=candidates%28content%28parts%28text%2CinlineData%29%29%2CfinishReason%29%2CusageMetadata%2CmodelVersion%2CresponseId%2CpromptFeedback' \
  -H "X-Toolswitch-Key: $TOOLSWITCH_KEY" \
  -H "Content-Type: application/json" \
  --data-raw '{"contents":[{"parts":[{"text":"A clean editorial illustration of a paper airplane."}]}],"generationConfig":{"imageConfig":{"imageSize":"1K","aspectRatio":"1:1"},"responseModalities":["IMAGE"]}}'

Diese Gateway-API ist eine Vorschauversion; URL und Authentifizierung können sich ändern. Die Beispielparameter sind Musterdaten. Aufrufe werden mit $0.04/success einschließlich Servicegebühr abgerechnet.