reapi_image-gen_gpt-image-2 $0.10125 per call
OpenAI: GPT Image 2. Generate or edit one image with GPT Image 2 at a flat per-resolution price. (reAPI · Image generation) Async task: answers 202 with a job id; poll GET /v1/jobs/<id>. Price depends on the options ($0.0375 to $0.10125); refunded if the task fails. Prepaid credits only.
For AI agents: call reapi_image-gen_gpt-image-2
POST https://toll402.dev/v1/p/reapi.image-gen.gpt-image-2
{
"model": "gpt-image-2",
"prompt": "A clean editorial illustration of a paper airplane.",
"size": "1:1",
"resolution": "1k"
}Answers 402 with x402 payment requirements; pay with any x402 client (@x402/fetch, x402 for Python, toll402-client, toll402-mcp) or send a prepaid-credits key as x-toll402-key (https://toll402.dev/credits). Paid per call via x402 (USDC on Base) or with a prepaid-credits key (x-toll402-key, card at /credits); charged only on success. Start at /llms.txt or connect the MCP server:
npx -y toll402-mcp · remote https://toll402.dev/mcp.Input schema
{
"type": "object",
"properties": {
"model": {
"type": "string",
"enum": [
"gpt-image-2"
],
"examples": [
"gpt-image-2"
]
},
"prompt": {
"type": "string",
"examples": [
"A clean editorial illustration of a paper airplane."
]
},
"size": {
"type": "string",
"description": "Aspect ratio.",
"default": "1:1",
"enum": [
"1:1",
"16:9",
"9:16",
"4:3",
"3:4",
"3:2",
"2:3",
"21:9"
],
"examples": [
"1:1"
]
},
"resolution": {
"type": "string",
"default": "1k",
"enum": [
"1k",
"2k",
"4k"
],
"examples": [
"1k"
]
},
"image_urls": {
"type": "array",
"description": "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 the"
}
},
"additionalProperties": true,
"required": [
"model",
"prompt"
]
}
MCP
{"mcpServers":{"toll402":{"command":"npx","args":["-y","toll402-mcp"],"env":{"TOLL402_WALLET_KEY":"0x..."}}}}