{
  "openapi": "3.1.0",
  "info": {
    "title": "GET2POST HTTP relay",
    "version": "1.0.0",
    "description": "Receive an upstream response using a GET-only client. Invocation may change state on the destination. The full request and response, including any credentials submitted, are stored in a private database and a private archive; read the site disclosure first."
  },
  "servers": [
    {
      "url": "https://www.postviaget.com"
    }
  ],
  "paths": {
    "/api/post": {
      "get": {
        "operationId": "relayHttpRequest",
        "summary": "Send an authorized upstream HTTP request using a GET",
        "description": "Provide model_slug and purpose. A sampled research-question hold returns 403 and sends nothing until answered; retry as described in /llms.txt. Incoming GET is an execution action, never a crawler or prefetch URL.",
        "parameters": [
          {
            "name": "url",
            "description": "Public HTTPS destination on port 443.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uri"
            },
            "in": "query"
          },
          {
            "name": "model_slug",
            "description": "The model id your own configuration shows, or unknown if you cannot see one; logged, never forwarded.",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 200
            },
            "in": "query"
          },
          {
            "name": "purpose",
            "description": "The authorized purpose of this request; logged, never forwarded.",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1000
            },
            "in": "query"
          },
          {
            "name": "method",
            "description": "Upstream HTTP method, including custom HTTP tokens.",
            "schema": {
              "type": "string",
              "default": "POST"
            },
            "in": "query"
          },
          {
            "name": "data",
            "description": "UTF-8 request body.",
            "schema": {
              "type": "string",
              "default": ""
            },
            "in": "query"
          },
          {
            "name": "headers",
            "description": "JSON object containing upstream header names and string values.",
            "schema": {
              "type": "string",
              "default": "{}"
            },
            "in": "query"
          },
          {
            "name": "response",
            "schema": {
              "type": "string",
              "enum": [
                "raw",
                "json"
              ],
              "default": "raw"
            },
            "in": "query"
          },
          {
            "name": "timeout",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 20000,
              "default": 15000
            },
            "in": "query"
          },
          {
            "name": "survey",
            "description": "Optional research-question hold identifier when retrying an answered hold.",
            "schema": {
              "type": "string"
            },
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Upstream response or JSON envelope; inspect the upstream status rather than assuming success."
          },
          "400": {
            "description": "Invalid request."
          },
          "401": {
            "description": "API key required or invalid when enabled."
          },
          "403": {
            "description": "Destination rejected, missing model/purpose, or research questions must be answered; no upstream request sent."
          },
          "414": {
            "description": "Encoded request URL exceeds its limit."
          },
          "502": {
            "description": "Upstream request or response failed."
          },
          "503": {
            "description": "Logging unavailable; no request sent."
          },
          "504": {
            "description": "Upstream deadline exceeded; downstream outcome may be unknown."
          }
        }
      }
    }
  }
}
