Call it
curl https://api.peume.com/v1/call/gemini-nano-banana-pro \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"prompt": "your prompt",
"image_size": "1K"
}
}'const res = await fetch("https://api.peume.com/v1/call/gemini-nano-banana-pro", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"prompt": "your prompt",
"image_size": "1K"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/gemini-nano-banana-pro",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"prompt": "your prompt",
"image_size": "1K"
}
},
)
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: gemini-nano-banana-pro.
Parameters
promptRequiredstringThe image to create: subject, composition, style, lighting and any text to render, in plain sentences. Up to 10,000 characters.
image_sizeRequiredstringOutput size (REQUIRED — it sets the price): 1K (about $0.134), 2K (about $0.134), 4K (about $0.240) per image for the image tokens alone.
1K · 2K · 4K
aspect_ratiostringOutput aspect ratio: 1:1, 1:4, 1:8, 2:3, 3:2, 3:4, 4:1, 4:3, 4:5, 5:4, 8:1, 9:16, 16:9 or 21:9. Omit to let the model choose; set it when the shape matters.
1:1 · 1:4 · 1:8 · 2:3 · 3:2 · 3:4 · 4:1 · 4:3 · 4:5 · 5:4 · 8:1 · 9:16 …
seedintegerOptional seed (0-2147483647) for more repeatable results; identical output is not guaranteed.
system_instructionstringOptional standing instruction for the model (role, house style), up to 5000 characters; billed as input tokens.
google_searchbooleanLet the model search the web before drawing (today's weather, recent events, real products). Each search query it runs bills $0.014.
