{
  "openapi": "3.1.0",
  "info": {
    "title": "AgentSearch Website Screenshot",
    "version": "1.0.0",
    "description": "Screenshot a public page in headless Chromium. 10 free calls per IP on https://relay.agentsearchhq.com/v1/screenshot, then $0.004 via https://api.agentsearchhq.com/x402/v1/screenshot.",
    "contact": {
      "url": "https://agentsearchhq.com/screenshot"
    }
  },
  "servers": [
    {
      "url": "https://relay.agentsearchhq.com",
      "description": "Free relay (10 screenshots per IP)"
    },
    {
      "url": "https://api.agentsearchhq.com",
      "description": "Paid x402 API ($0.004) \u2014 use /x402/v1/screenshot"
    }
  ],
  "paths": {
    "/v1/screenshot": {
      "post": {
        "summary": "Website screenshot",
        "description": "PNG or JPEG screenshot of a public URL.",
        "operationId": "website_screenshot",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "format": "uri",
                    "description": "Absolute public http(s) URL."
                  },
                  "format": {
                    "type": "string",
                    "enum": [
                      "png",
                      "jpeg"
                    ],
                    "description": "Image format (default png)."
                  },
                  "full_page": {
                    "type": "boolean",
                    "description": "Capture the whole page (clipped at 4000 px)."
                  },
                  "viewport": {
                    "type": "object",
                    "properties": {
                      "width": {
                        "type": "integer",
                        "minimum": 320,
                        "maximum": 1920
                      },
                      "height": {
                        "type": "integer",
                        "minimum": 240,
                        "maximum": 1600
                      }
                    }
                  }
                }
              },
              "example": {
                "url": "https://example.com",
                "format": "png"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success. Includes free_allowance when served by the free relay."
          },
          "400": {
            "description": "Invalid input."
          },
          "402": {
            "description": "Free allowance used; x402 payment required (AgentSearch-tagged clients receive 429)."
          },
          "429": {
            "description": "Free allowance used (AgentSearch packages) or a daily trial cap."
          }
        }
      }
    }
  }
}
