Call it
curl https://api.peume.com/v1/call/google-gemini-3-1-flash-lite-image-nano-banana \
-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.1-flash-lite-image",
"contents": [
{
"parts": [
{
"text": "A clean editorial illustration of a paper airplane."
}
]
}
],
"generationConfig": "your generationConfig"
}
}'const res = await fetch("https://api.peume.com/v1/call/google-gemini-3-1-flash-lite-image-nano-banana", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"fields": "candidates(content(parts(text,inlineData)),finishReason),usageMetadata,modelVersion,responseId,promptFeedback",
"model": "gemini-3.1-flash-lite-image",
"contents": [
{
"parts": [
{
"text": "A clean editorial illustration of a paper airplane."
}
]
}
],
"generationConfig": "your generationConfig"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/google-gemini-3-1-flash-lite-image-nano-banana",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"fields": "candidates(content(parts(text,inlineData)),finishReason),usageMetadata,modelVersion,responseId,promptFeedback",
"model": "gemini-3.1-flash-lite-image",
"contents": [
{
"parts": [
{
"text": "A clean editorial illustration of a paper airplane."
}
]
}
],
"generationConfig": "your generationConfig"
}
},
)
print(res.json()["output"])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-1-flash-lite-image-nano-banana.
Parameters
fieldsstringGoogle's partial-response mask; the example drops the multi-megabyte thoughtSignature. Keep usageMetadata in any mask you send.
Example: candidates(content(parts(text,inlineData)),finishReason),usageMetadata,modelVersion,responseId,promptFeedback
modelRequiredstring's key runs only gemini-3.1-flash-lite-image; your own key can name another model.
Example: gemini-3.1-flash-lite-image
contentsRequiredarrayOne 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>}}.
Example: [{"parts":[{"text":"A clean editorial illustration of a paper airplane."}]}]
generationConfigRequiredobject