Call it
curl https://api.peume.com/v1/call/gpt-image-2-6-precise-edit \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"prompt": "your prompt",
"size": "your size",
"quality": "low",
"images": []
}
}'const res = await fetch("https://api.peume.com/v1/call/gpt-image-2-6-precise-edit", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"prompt": "your prompt",
"size": "your size",
"quality": "low",
"images": []
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/gpt-image-2-6-precise-edit",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"prompt": "your prompt",
"size": "your size",
"quality": "low",
"images": []
}
},
)
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: gpt-image-2-6-precise-edit.
Parameters
promptRequiredstringThe image to create — content, style, composition — or the editing instruction when input images are provided. Up to 32,000 characters.
sizeRequiredstringOutput resolution "WIDTHxHEIGHT" (REQUIRED — it sets the price). Any size whose edges are multiples of 16, aspect ratio 1:3 to 3:1, no edge above 3840px, total pixels 655,360 to 8,294,400. E.g. 1024x1024, 1536x1024, 2048x2048, 3840x2160.
qualityRequiredstringRendering quality (REQUIRED — it sets the price): low, medium, high, xhigh, max. Higher tiers render more detail and cost more tokens.
low · medium · high · xhigh · max
backgroundstringBackground of the image: "transparent", "opaque", or "auto" (default — the model decides).
transparent · opaque · auto
complexitystringHow much the model plans before rendering: "high" (default) helps dense text and complex layouts; "low" suits focused edits like a background swap. Same price at every level.
low · medium · high
imagesRequiredarray1-16 input images to edit or use as references. Order defines the reference order; a mask applies to the first image. Each input image bills its input tokens.
maskstringPublic https:// URL of a mask image: same size and format as the first input image, with an alpha channel whose transparent areas mark what to edit. Guidance only — the model may not follow its shape exactly.
markupstringPublic https:// URL of a markup layer: a transparent PNG the size of the first input image with circles, arrows or notes drawn where the edit should happen; the prompt says what to change there. Cannot be combined with `mask`.
