piapi_image-gen_gpt-image-2 $0.211251 per call

OpenAI: GPT Image 2. Generate images with GPT Image 2 (medium quality only) through PiAPI's OpenAI-shaped async route. (PiAPI · Image generation) Async task: answers 202 with a job id; poll GET /v1/jobs/<id>. Price depends on the options ($0.008 to $0.211251); refunded if the task fails. Prepaid credits only.

For AI agents: call piapi_image-gen_gpt-image-2
POST https://toll402.dev/v1/p/piapi.image-gen.gpt-image-2
{
 "model": "gpt-image-2",
 "prompt": "A clean editorial illustration of a paper airplane.",
 "size": "1024x1024",
 "quality": "medium",
 "n": 1
}
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",
   "default": "1024x1024",
   "enum": [
    "1024x1024",
    "1024x1536",
    "1536x1024"
   ],
   "examples": [
    "1024x1024"
   ]
  },
  "quality": {
   "type": "string",
   "default": "medium",
   "enum": [
    "medium"
   ],
   "examples": [
    "medium"
   ]
  },
  "n": {
   "type": "integer",
   "default": 1,
   "examples": [
    1
   ]
  }
 },
 "additionalProperties": true,
 "required": [
  "model",
  "prompt"
 ]
}

MCP

{"mcpServers":{"toll402":{"command":"npx","args":["-y","toll402-mcp"],"env":{"TOLL402_WALLET_KEY":"0x..."}}}}

All tools · OpenAPI