PeumeAPI

AI generation

OpenAI: GPT Image 2

Generate or edit one image with GPT Image 2 at a flat per-resolution price.

$0.122 per lookup, only when foundUsually answers in about a second

Call it

curl https://api.peume.com/v1/call/openai-gpt-image-2-2 \
  -H "Authorization: Bearer $PEUME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "model": "gpt-image-2",
    "prompt": "A clean editorial illustration of a paper airplane.",
    "size": "1:1",
    "resolution": "1k"
  }
}'

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: openai-gpt-image-2-2.

Parameters

modelRequiredstring

gpt-image-2

Example: gpt-image-2

promptRequiredstring

Example: A clean editorial illustration of a paper airplane.

sizestring

Aspect ratio.

1:1 · 16:9 · 9:16 · 4:3 · 3:4 · 3:2 · 2:3 · 21:9

Example: 1:1

resolutionstring

1k · 2k · 4k

Example: 1k

image_urlsarray

Up to 16 public image URLs for image-to-image. Each URL must answer a plain GET with the raw image bytes and an image/* content-type (signed cloud-storage or CDN links work; file-page hosts such as tmpfiles.org return HTML, and the task then fails unbilled with the vendor's generic upstream error). ` host <file>` prints a URL that satisfies this.

Other ways to do it

Same job, other sources, cheapest first.

Start free · $1 of calls included

Every API your product needs. One key.

7,267 endpoints, one bill, and you only pay for calls that work.