PeumeAPI

AI generation · Gemini

Google: Gemini 3 Pro Image (Nano Banana Pro)

Generate 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.

$0.39 per lookup, only when foundUsually answers in under a minute

Call it

curl https://api.peume.com/v1/call/google-gemini-3-pro-image-nano-banana-pro \
  -H "Authorization: Bearer $PEUME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "fields": "candidates(content(parts(text,inlineData)),finishReason),usageMetadata,modelVersion,responseId,promptFeedback",
    "model": "gemini-3-pro-image",
    "contents": [
      {
        "parts": [
          {
            "text": "A clean editorial illustration of a paper airplane."
          }
        ]
      }
    ],
    "generationConfig": "your generationConfig"
  }
}'

Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: google-gemini-3-pro-image-nano-banana-pro.

Parameters

fieldsstring

Google's partial-response mask. The example drops the multi-megabyte thoughtSignature and roughly halves the answer; keep usageMetadata in any mask you send.

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

modelRequiredstring

's key runs gemini-3-pro-image, the stable model, or its -preview alias, the same model at the same price; your own key can name another model.

Example: gemini-3-pro-image

contentsRequiredarray

One user turn: {parts: [{text: prompt},...references]}. A reference image is {fileData: {mimeType: image/png, fileUri: <public https URL>}} (Google fetches it; ` host <file>` prints a URL that works) or {inlineData: {mimeType, data: <base64>}} (a 10 MB request carrying a 7.5 MB image worked live). Up to 14 references; each bills 258 input tokens whatever its size.

Example: [{"parts":[{"text":"A clean editorial illustration of a paper airplane."}]}]

generationConfigRequiredobject

Other ways to do it

Same job, other sources, cheapest first.

Start free · $1 of calls included

Every API your product needs. One key.

7,267 endpoints, one bill, and you only pay for calls that work.