Google: Gemini 3.1 Flash Image (Nano Banana 2)
From Google AI (Gemini API), through Joshu Data Bodega.
- Price
- $0.181 per call
No calls measured in the last 30 days.
Prices include the router's 10% markup and are paid from the usage wallet. Checked on November 11, 2026.
Inputs
fieldsstring, optionalGoogle's partial-response mask; the example drops the multi-megabyte thoughtSignature. Keep usageMetadata in any mask you send.
contentsarray, requiredOne user turn: {parts: [{text: prompt}, ...references]}. A reference image is {fileData: {mimeType: image/png, fileUri: public https URL }} (Google fetches it; `treg host file ` prints a URL that works) or {inlineData: {mimeType, data: base64 }}.
generationConfigobject, required
Call it
curl https://hello.joshu.me/api/router/call \
-H "Authorization: Bearer $JOSHU_ROUTER_KEY" \
-H "Content-Type: application/json" \
-d '{
"endpoint": "google-ai.image-gen.gemini-3-1-flash-image",
"params": {
"fields": "candidates(content(parts(text,inlineData)),finishReason),usageMetadata,modelVersion,responseId,promptFeedback",
"contents": [
{
"parts": [
{
"text": "A clean editorial illustration of a paper airplane."
}
]
}
],
"generationConfig": {
"imageConfig": {
"imageSize": "1K",
"aspectRatio": "1:1"
},
"responseModalities": [
"IMAGE"
]
}
}
}'