{
  "openapi": "3.1.0",
  "info": {
    "title": "Image Generation by Agentropolis",
    "version": "0.1.0",
    "summary": "Text prompt → one generated image (PNG/JPEG, 1:1, 16:9, 9:16 and more) as a temporary URL. $0.05 USDC per image via x402 on Base; settles only after the image is delivered.",
    "description": "Image generation: your own text prompt → 1 image (1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3), returned as a temporary URL (24 h). Flat $0.05 per image. Original subjects only. Invalid or refused prompts get a 4xx before payment.",
    "contact": {
      "name": "Agentropolis",
      "url": "https://agentropolis.io",
      "email": "hello@agentropolis.io"
    },
    "x-guidance": "POST {\"prompt\":\"...\",\"aspect_ratio\":\"1:1\"}; pay the x402 402; read image.url (download within 24 h)."
  },
  "servers": [
    {
      "url": "https://seenly-video-clip.vercel.app"
    }
  ],
  "paths": {
    "/api/image": {
      "post": {
        "operationId": "generateImage",
        "summary": "Generate one image from a text prompt",
        "tags": [
          "Media"
        ],
        "description": "$0.05 USDC per image via x402 on Base mainnet. Validated before payment; settles only on success. Typical latency 5-20 s.",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.05"
          },
          "protocols": [
            {
              "x402": {}
            }
          ],
          "rails": [
            {
              "protocol": "x402",
              "version": 2,
              "scheme": "exact",
              "network": "eip155:8453",
              "networkName": "Base mainnet",
              "asset": "USDC",
              "assetAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
              "amount": "50000",
              "payTo": "0xeE6239F3E17bEBe5e89F21F29D74D68CAa0d78CE",
              "facilitator": "Coinbase CDP (gas sponsored; payer needs USDC only, no ETH)",
              "header": "PAYMENT-SIGNATURE",
              "priceUsd": "0.05"
            }
          ],
          "environment": "live"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImageRequest"
              },
              "example": {
                "prompt": "a cozy reading nook by a rainy window, warm lamp light, watercolor style",
                "aspect_ratio": "1:1"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Generated image",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeneratedImage"
                }
              }
            }
          },
          "402": {
            "description": "Payment required (x402 v2 PAYMENT-REQUIRED header)"
          },
          "422": {
            "description": "invalid_request | content_refused | third_party_source_refused (not charged)"
          },
          "429": {
            "description": "rate_limited"
          },
          "502": {
            "description": "generation_failed | storage_failed (not charged)"
          },
          "503": {
            "description": "upstream_unavailable | busy (not charged)"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ImageRequest": {
        "type": "object",
        "properties": {
          "prompt": {
            "type": "string",
            "minLength": 3,
            "maxLength": 1500,
            "description": "What to draw, in your own words. No URLs, no named copyrighted characters, no real-person impersonation, no sexual content."
          },
          "aspect_ratio": {
            "type": "string",
            "enum": [
              "1:1",
              "16:9",
              "9:16",
              "4:3",
              "3:4",
              "3:2",
              "2:3"
            ],
            "default": "1:1"
          }
        },
        "required": [
          "prompt"
        ]
      },
      "GeneratedImage": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "generated_image"
          },
          "image": {
            "type": "object",
            "description": "url (temporary, deleted after 24 h), expires_at, bytes, media_type."
          },
          "model": {
            "type": "string"
          },
          "billing": {
            "type": "object"
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "image",
          "billing"
        ]
      }
    }
  }
}