Google: Gemini 3 Pro Image (Nano Banana Pro)
google-ai.image-gen.gemini-3-pro-imageGenerate or edit one image with Gemini 3 Pro Image at 1K, 2K or 4K on Google's own API, from a prompt and optional reference image URLs; the image returns inline as base64.
- Price
- $0.26/successZum Anbieterpreis
- Success rate
- 98,4 %Last 30 days · 3.179 calls
- Latency p50
- 22 sp95 34 s
- Last verified
- 29.09.2026Verified working
POSThttps://toolswitch.dev/v1/tools/google-ai.image-gen.gemini-3-pro-image?fields=candidates%28content%28parts%28text%2CinlineData%29%29%2CfinishReason%29%2CusageMetadata%2CmodelVersion%2CresponseId%2CpromptFeedbackPreview- Uses platform quota
- Synchronous response
- Reads public data
Parameter
| Parameter | Typ | Erforderlich | Beschreibung | Beispiel |
|---|---|---|---|---|
| Pfadparameter | ||||
model | Zeichenkette | Erforderlich | gemini-3-pro-image is the stable model; the -preview alias is the same model at the same price. | gemini-3-pro-image |
| Abfrageparameter | ||||
fields | Zeichenkette | Optional | Google's partial-response mask. The example drops the multi-megabyte thoughtSignature and roughly halves the answer; keep usageMetadata in any mask you send. | candidates(content(parts(text,inlineData)),finishReason),usageMetadata,modelVersion,responseId,promptFeedback |
- Pfadparameter
modelZeichenketteErforderlichgemini-3-pro-image is the stable model; the -preview alias is the same model at the same price.
Beispiel:
gemini-3-pro-image- Abfrageparameter
fieldsZeichenketteOptionalGoogle's partial-response mask. The example drops the multi-megabyte thoughtSignature and roughly halves the answer; 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.
curl -X POST 'https://toolswitch.dev/v1/tools/google-ai.image-gen.gemini-3-pro-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"]}}'import os
import json
import requests
response = requests.request(
"POST",
"https://toolswitch.dev/v1/tools/google-ai.image-gen.gemini-3-pro-image?fields=candidates%28content%28parts%28text%2CinlineData%29%29%2CfinishReason%29%2CusageMetadata%2CmodelVersion%2CresponseId%2CpromptFeedback",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
json=json.loads("{\"contents\":[{\"parts\":[{\"text\":\"A clean editorial illustration of a paper airplane.\"}]}],\"generationConfig\":{\"imageConfig\":{\"imageSize\":\"1K\",\"aspectRatio\":\"1:1\"},\"responseModalities\":[\"IMAGE\"]}}"),
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/google-ai.image-gen.gemini-3-pro-image?fields=candidates%28content%28parts%28text%2CinlineData%29%29%2CfinishReason%29%2CusageMetadata%2CmodelVersion%2CresponseId%2CpromptFeedback", {
method: "POST",
headers: {
"X-Toolswitch-Key": process.env.TOOLSWITCH_KEY ?? "",
"Content-Type": "application/json",
},
body: JSON.stringify(JSON.parse("{\"contents\":[{\"parts\":[{\"text\":\"A clean editorial illustration of a paper airplane.\"}]}],\"generationConfig\":{\"imageConfig\":{\"imageSize\":\"1K\",\"aspectRatio\":\"1:1\"},\"responseModalities\":[\"IMAGE\"]}}")),
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
console.log(await response.text());Diese Gateway-API ist eine Vorschauversion; URL und Authentifizierung können sich ändern. Die Beispielparameter sind Musterdaten. Aufrufe werden mit $0.26/success einschließlich Servicegebühr abgerechnet.