Call it
curl https://api.peume.com/v1/call/gemini-nano-banana-2-1-edit \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"prompt": "your prompt",
"image_size": "512"
}
}'const res = await fetch("https://api.peume.com/v1/call/gemini-nano-banana-2-1-edit", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"prompt": "your prompt",
"image_size": "512"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/gemini-nano-banana-2-1-edit",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"prompt": "your prompt",
"image_size": "512"
}
},
)
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-2-1-edit.
Parameters
promptRequiredstringThe edit or composition instruction: what to change, add or combine, and what to keep the same. Refer to the inputs in order ("the first image", "the video"). Up to 10,000 characters.
image_sizeRequiredstringOutput size (REQUIRED — it sets the price): 512 (about $0.022), 1K (about $0.034), 2K (about $0.050), 4K (about $0.113) per image for the image tokens alone.
512 · 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 …
thinking_levelstringHow much the model reasons before drawing: minimal, medium, high. Higher levels can help complex layouts and text; thinking tokens bill as text output.
minimal · medium · high
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.
imagesarrayPublic https:// URLs of up to 14 images (max 10 MB each): the image to edit, or objects, characters and styles to combine.
videosarrayPublic https:// URLs of up to 3 short videos (max 20 MB each) to draw from.
