{
  "openapi": "3.1.0",
  "info": {
    "title": "Go HTTP Proxy",
    "summary": "Server-side fetch a URL and return the response body.",
    "description": "Performs a GET or POST against the supplied target URL from the service host (egress IP differs from your client). Useful for scraping, bypassing geo-restrictions, or inspecting how a site responds to a different IP. Returns the upstream body verbatim.",
    "version": "1.0.0",
    "contact": {
      "name": "baditaflorin",
      "url": "https://github.com/baditaflorin/go-proxy"
    }
  },
  "servers": [
    {
      "url": "https://go-proxy.0exec.com",
      "description": "Production"
    }
  ],
  "tags": [
    {
      "name": "proxy"
    },
    {
      "name": "http"
    },
    {
      "name": "scraping"
    }
  ],
  "paths": {
    "/": {
      "get": {
        "summary": "Fetch a URL via HTTP",
        "responses": {
          "200": {
            "description": "text/html or original content-type"
          },
          "400": {
            "description": "Bad request \u2014 missing/invalid params"
          },
          "500": {
            "description": "Server error"
          }
        },
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "description": "Target URL to fetch",
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-example-url": "https://go-proxy.0exec.com/?url=https://api.ipify.org"
      },
      "post": {
        "summary": "Fetch a URL via HTTP POST",
        "responses": {
          "200": {
            "description": "text/html or original content-type"
          },
          "400": {
            "description": "Bad request \u2014 missing/invalid params"
          },
          "500": {
            "description": "Server error"
          }
        },
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "description": "Target URL",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/octet-stream": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            }
          },
          "description": "raw forwarded request body"
        }
      }
    },
    "/.deploy/version.json": {
      "get": {
        "summary": "Deploy metadata (gateway-served)",
        "responses": {
          "200": {
            "description": "JSON with service, commit, build_date"
          }
        },
        "tags": [
          "meta"
        ]
      }
    },
    "/_gw_health": {
      "get": {
        "summary": "Gateway-level liveness (always 200 if gateway up)",
        "responses": {
          "200": {
            "description": "ok"
          }
        },
        "tags": [
          "meta"
        ]
      }
    },
    "/openapi.json": {
      "get": {
        "summary": "This OpenAPI document",
        "responses": {
          "200": {
            "description": "OpenAPI 3.1 spec"
          }
        },
        "tags": [
          "meta"
        ]
      }
    },
    "/llms.txt": {
      "get": {
        "summary": "LLM-friendly plain-text description of this service",
        "responses": {
          "200": {
            "description": "text/plain"
          }
        },
        "tags": [
          "meta"
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "Required on prod (set via API_KEY env)."
      },
      "ApiKeyQuery": {
        "type": "apiKey",
        "in": "query",
        "name": "api_key",
        "description": "API key in query parameter (browser-friendly)"
      }
    }
  },
  "security": [
    {
      "ApiKeyHeader": []
    },
    {
      "ApiKeyQuery": []
    }
  ]
}
