{
  "openapi": "3.1.0",
  "info": {
    "title": "WHP Standing — Sovereign Epistemological Evaluator & x402 Pre-Settlement Gate",
    "version": "1.8.0",
    "description": "Sovereign epistemological evaluator (not a passive notary). There is one evaluation door (/v1/evaluate), one service all the way through. When a client or autonomous agent inserts their data through the door, a sovereign Large Language Model waiting inside the door — having been given Decision Integrity: The Continuous Work (Version 7) — adopts the reasoning from the text and applies that epistemological reasoning to whatever data the client puts through the door. The evaluation is the Large Language Model applying the Decision Integrity Version 7 reasoning to that data, and the output is signed with the WHP Standing Mark (WHP-STANDING-MARK-v1) and handed back to the client. TEST is never LIVE."
  },
  "servers": [
    {
      "url": "https://api.wheelerhubbellpublishing.com"
    }
  ],
  "x-whp-evaluation-door": "/v1/evaluate",
  "x-whp-evaluator-class": "SOVEREIGN_EPISTEMOLOGICAL_EVALUATOR",
  "x-whp-purchase-contract": "/v1/contract",
  "x-whp-verification": "/v1/verification",
  "components": {
    "securitySchemes": {
      "ClientProof": {
        "type": "apiKey",
        "in": "header",
        "name": "WHP-Client-Proof",
        "description": "Base64 WHP-CLIENT-PROOF-v1 Ed25519 signature binding method, exact path/query, body SHA256, issued_at, expires_at and random nonce. See wire contract."
      }
    }
  },
  "paths": {
    "/.well-known/whp-standing.json": {
      "get": {
        "operationId": "discoverStanding",
        "summary": "Machine-readable discovery manifest for the WHP Standing Sovereign Epistemological Evaluator.",
        "responses": {
          "200": {
            "description": "Machine-readable discovery manifest: single door, MCP tools, x402 settlement terms, and links to contract, capability, OpenAPI, and llms.txt.",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/.well-known/standing-capability.json": {
      "get": {
        "summary": "HTTPS capability and key discovery metadata; not a separately signed assertion or independent issuer admission.",
        "responses": {
          "200": {
            "description": "Current authority key_id and Ed25519 public key for verifying signed records.",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/llms.txt": {
      "get": {
        "operationId": "getMachineDocumentation",
        "summary": "Agent-facing guide to the single /v1/evaluate door, epistemological LLM (Decision Integrity: The Continuous Work (Version 7)) epistemological reasoning, and x402 pre-settlement Standing Mark rules.",
        "responses": {
          "200": {
            "description": "Agent-facing plain-text guide to the single door, pricing, MCP tools, and verification.",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/mcp": {
      "post": {
        "operationId": "callStandingMcp",
        "summary": "Stateless Streamable HTTP MCP routing to the single evaluation door (/v1/evaluate); exposes whp_evaluate, whp_authorize_x402_transaction, whp_retrieve_result, whp_recover_purchase, and whp_get_contract.",
        "responses": {
          "200": {
            "description": "MCP protocol response (initialize, tools/list, tools/call) for the five whp_* tools.",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/v1/contract": {
      "get": {
        "operationId": "getStandingPurchaseContract",
        "responses": {
          "200": {
            "description": "Live wire contract: single-door terms, data-handling facts, and integration rule.",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/v1/evaluate": {
      "get": {
        "summary": "Query single-door epistemological evaluation terms or lookup a completed Standing Mark evaluation by nonce or hash",
        "responses": {
          "200": {
            "description": "Unpaid buyer brief: method, input fields and aliases, full x402 payment requirements, signer key_id and public key, and contract/verification/discovery URLs.",
            "content": {
              "application/json": {}
            }
          }
        }
      },
      "post": {
        "operationId": "evaluateThroughSingleDoor",
        "summary": "The single epistemological evaluation door (x402, 1 USDC on Base). Client inserts data through this door; inside the door, a sovereign Large Language Model given Decision Integrity: The Continuous Work (Version 7) adopts its reasoning and applies it to the client's data. The evaluation result is signed with the WHP Standing Mark (WHP-STANDING-MARK-v1) and handed back to the client.",
        "security": [
          {
            "ClientProof": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "One proposition field is required: claim (aliases: text, prompt, content). Max claim 4000 chars, subject 2000 chars, body 5 MB. An Idempotency-Key header replays a prior result without a second charge.",
                "properties": {
                  "claim": {
                    "type": "string",
                    "description": "Proposition or claim text to examine. Aliases: text, prompt, content."
                  },
                  "subject": {
                    "type": "string",
                    "description": "Optional subject or context summary; defaults to the claim summary."
                  },
                  "data": {
                    "type": [
                      "string",
                      "object"
                    ],
                    "description": "Optional client material to examine."
                  },
                  "requested_operation": {
                    "type": "string",
                    "enum": [
                      "DESCRIBE",
                      "INQUIRE",
                      "WARN",
                      "REVIEW",
                      "INFORM",
                      "RECOMMEND",
                      "CONCLUDE",
                      "EXECUTE"
                    ],
                    "description": "Optional requested operation; not enum-enforced."
                  },
                  "qualifiers": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Binding conditions, caveats, and scope limits traveling with the claim."
                  },
                  "provenance": {
                    "type": "object",
                    "properties": {
                      "source": {
                        "type": "string"
                      },
                      "authority": {
                        "type": "string"
                      },
                      "evidence": {
                        "type": "array",
                        "items": {
                          "type": [
                            "string",
                            "object"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Signed WHP-STANDING-MARK-v1 envelope (POSITIVE_STANDING_MARK or NEGATIVE_STANDING_FINDING). Includes payment-response header with the settlement receipt.",
            "content": {
              "application/json": {}
            }
          },
          "400": {
            "description": "INVALID_JSON, INVALID_INPUT (missing/oversized proposition, accepted fields listed), or AMBIGUOUS_INPUT_ALIASES. Raised before payment is verified; no charge.",
            "content": {
              "application/json": {}
            }
          },
          "401": {
            "description": "INVALID_API_KEY when a subscription key was supplied but is invalid.",
            "content": {
              "application/json": {}
            }
          },
          "402": {
            "description": "Payment required. Body is the x402 v2 terms object (x402Version, resource, accepts, extensions.bazaar, repair_instructions); the same terms are also carried base64-encoded in the payment-required header. Pay by signing an EIP-3009 authorization for 1 USDC on Base (eip155:8453) to 0x1050eddd8282623b0c263ed6bdbd42370bbc28d3 and resend with a payment-signature or x-payment header.",
            "headers": {
              "payment-required": {
                "description": "Base64-encoded x402 v2 payment terms.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {}
            }
          },
          "403": {
            "description": "MONTHLY_ALLOWANCE_EXCEEDED for subscription keys over their tier allowance.",
            "content": {
              "application/json": {}
            }
          },
          "405": {
            "description": "Method not allowed on this door.",
            "content": {
              "application/json": {}
            }
          },
          "413": {
            "description": "BODY_TOO_LARGE: request body over 5 MB.",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/v1/verification": {
      "get": {
        "summary": "Verification guide and key specification.",
        "responses": {
          "200": {
            "description": "Verification guide: online reference verifier usage and offline Ed25519-over-JCS procedure.",
            "content": {
              "application/json": {}
            }
          }
        }
      },
      "post": {
        "summary": "Verify a signed WHP-STANDING-MARK-v1 evaluation envelope",
        "responses": {
          "200": {
            "description": "Verification result for the submitted signed envelope (valid flag and error list).",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/v1/profiles": {
      "get": {
        "summary": "Published profile index binding Decision Integrity: The Continuous Work (Version 7).",
        "responses": {
          "200": {
            "description": "Published profile index binding Decision Integrity: The Continuous Work (Version 7).",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/v1/purchases/{purchase_id}/result": {
      "get": {
        "operationId": "retrieveResult",
        "security": [
          {
            "ClientProof": []
          }
        ],
        "parameters": [
          {
            "name": "purchase_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The stored signed Standing Mark Record for the purchase; zero second charge, bound to the WHP-Client-Proof header.",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/v1/purchases/{purchase_id}/recover": {
      "post": {
        "operationId": "recoverOriginalPurchase",
        "security": [
          {
            "ClientProof": []
          }
        ],
        "parameters": [
          {
            "name": "purchase_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Recovery of the settled Standing Mark Record for the purchase; zero second charge, bound to the WHP-Client-Proof header.",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/v1/registry/{purchase_id}": {
      "get": {
        "operationId": "readRegistry",
        "parameters": [
          {
            "name": "purchase_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Append-only registry entry for the purchase.",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    }
  }
}