Call it
curl https://api.peume.com/v1/call/generate-and-edit-images-fast \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"prompt": "your prompt",
"size": "your size",
"n": 1,
"prompt_extend": true,
"watermark": false
}
}'const res = await fetch("https://api.peume.com/v1/call/generate-and-edit-images-fast", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"prompt": "your prompt",
"size": "your size",
"n": 1,
"prompt_extend": true,
"watermark": false
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/generate-and-edit-images-fast",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"prompt": "your prompt",
"size": "your size",
"n": 1,
"prompt_extend": True,
"watermark": False
}
},
)
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: generate-and-edit-images-fast.
Parameters
promptRequiredstringThe positive prompt: image content, style, composition — or the editing instruction when input images are provided. Recommended maximum 4,500 tokens.
imagesarray0-3 input images for image editing / image-to-image. Order defines the reference order. Each input image bills $0.003.
sizeRequiredstringOutput resolution "width*height" (REQUIRED — it also selects the output price tier). Total pixels 512*512 to 2048*2048, aspect ratio 1:8 to 8:1. E.g. 1024*1024 (1K tier), 2048*2048 (2K tier).
nintegerNumber of output images (1-6). Drives the per-image charge.
Example: 1
negative_promptstringContent to exclude from the image.
prompt_extendbooleanIntelligent prompt rewriting (recommended for short prompts). Default true.
Example: true
prompt_extend_modestring"direct" (default) suits most cases and works for both generation and editing; "agent" rewrites more thoroughly but is text-to-image ONLY.
direct · agent
enable_thinkingbooleanThinking mode (default true): better quality, slower. Requires prompt_extend.
watermarkbooleanAdd an "AI Generated" watermark. Default false.
Example: false
seedintegerRandom seed for reproducibility. Same seed does not guarantee identical results.
