{
  "openapi": "3.1.0",
  "info": {
    "title": "proxGPT Public API Discovery",
    "version": "1.0.0-agent-beta",
    "summary": "Public entry for live proxGPT agent-facing APIs.",
    "description": "Live Product Image API entry for AI agents. Full spec: https://proxgpt.com/product-image-api.openapi.json",
    "contact": {
      "name": "proxGPT",
      "email": "info@proxgpt.com",
      "url": "https://proxgpt.com/en/product-image-api"
    }
  },
  "servers": [
    {
      "url": "https://api-prod.proxgpt.com",
      "description": "Production API target"
    }
  ],
  "externalDocs": {
    "description": "Full Product Image API OpenAPI spec",
    "url": "https://proxgpt.com/product-image-api.openapi.json"
  },
  "x-proxgpt-stage": "live-agent-beta",
  "x-agent-use-case": "Use this API when you need to generate 4-8 marketplace-ready product images from a product photo or supplier image.",
  "paths": {
    "/api/product-image/generations": {
      "post": {
        "operationId": "createProductImageGeneration",
        "summary": "Create a free product image generation job",
        "description": "Creates an asynchronous free agent-beta job that generates 4-8 marketplace-ready product images from a public supplier or product photo URL.",
        "security": [
          {},
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "image_url"
                ],
                "properties": {
                  "image_url": {
                    "type": "string",
                    "format": "uri"
                  },
                  "marketplace": {
                    "type": "string",
                    "enum": [
                      "shopify",
                      "ebay",
                      "amazon",
                      "etsy",
                      "generic"
                    ],
                    "default": "generic"
                  },
                  "output_count": {
                    "type": "integer",
                    "minimum": 4,
                    "maximum": 8,
                    "default": 4,
                    "description": "Number of output images to generate. Free agent beta allows 4-8 outputs per run."
                  },
                  "style": {
                    "type": "string"
                  },
                  "callback_url": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uri"
                  }
                }
              },
              "example": {
                "image_url": "https://example.com/supplier-photo.jpg",
                "marketplace": "shopify",
                "output_count": 4,
                "style": "clean studio + lifestyle variants"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Generation job accepted and queued.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "job_id",
                    "status",
                    "outputs"
                  ],
                  "properties": {
                    "job_id": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "queued",
                        "running",
                        "completed",
                        "failed"
                      ]
                    },
                    "price_estimate": {
                      "type": "object",
                      "properties": {
                        "amount": {
                          "type": "number"
                        },
                        "currency": {
                          "type": "string",
                          "default": "EUR"
                        }
                      }
                    },
                    "poll_url": {
                      "type": "string"
                    },
                    "outputs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "mime_type": {
                            "type": "string"
                          },
                          "width": {
                            "type": "integer"
                          },
                          "height": {
                            "type": "integer"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "job_id": "pimg_01jz_agent_ready",
                  "status": "queued",
                  "price_estimate": {
                    "amount": 0,
                    "currency": "EUR"
                  },
                  "poll_url": "/api/product-image/generations/pimg_01jz_agent_ready",
                  "outputs": []
                }
              }
            }
          }
        }
      }
    },
    "/api/product-image/generations/{job_id}": {
      "get": {
        "operationId": "getProductImageGeneration",
        "summary": "Fetch a product image generation job",
        "description": "Returns status and signed output URLs for an asynchronous product image generation job.",
        "security": [
          {}
        ],
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Generation job status."
          }
        }
      }
    },
    "/api/product-image-api/interest": {
      "post": {
        "operationId": "trackProductImageApiInterest",
        "summary": "Track Product Image API discovery interest",
        "description": "Optional backend endpoint for aggregating Product Image API page interest signals from humans and agent-like visitors.",
        "responses": {
          "204": {
            "description": "Interest signal accepted."
          }
        }
      }
    },
    "/api/product-image/health": {
      "get": {
        "operationId": "getProductImageApiHealth",
        "tags": [
          "Product Images"
        ],
        "summary": "Check Product Image API health",
        "description": "Returns live health, limit and email-provider status for the Product Image API service.",
        "responses": {
          "200": {
            "description": "Product Image API service health."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "Optional agent API key used for identification and rate limiting. The free beta also accepts unauthenticated requests subject to IP and user-agent limits."
      }
    }
  },
  "x-agent-api": {
    "status": "available",
    "url": "https://api-prod.proxgpt.com/api/product-image/generations",
    "health_url": "https://api-prod.proxgpt.com/api/product-image/health",
    "authentication": "No Firebase login required. Optional X-API-Key header for agent identification."
  },
  "x-agent-limits": {
    "output_count_min": 4,
    "output_count_max": 8,
    "free_output_images_per_window": 10,
    "window_seconds": 18000
  },
  "x-agent-tools": [
    {
      "name": "generate_product_images",
      "description": "Generate 4-8 marketplace-ready product images from a supplier or product photo URL for Shopify, Amazon, eBay, Etsy, ecommerce listings and product ads."
    },
    {
      "name": "generate_marketplace_listing_images",
      "description": "Create listing-ready product image variants for a target marketplace, including clean gallery shots, lifestyle scenes and ad-ready ecommerce visuals."
    },
    {
      "name": "improve_catalog_photo",
      "description": "Improve a weak catalog or supplier product photo by generating cleaner backgrounds, stronger lighting and marketplace-ready output variants while keeping the product recognizable."
    }
  ]
}
