{
  "openapi": "3.1.0",
  "info": {
    "title": "MilliAPI x402 API with Church of 402 discovery",
    "version": "4.0.0",
    "description": "MilliAPI is separable commercial x402 infrastructure. The Church of 402 has its own canonical identity at church402.org and agent entrance at 402church.org. Machine Observer remains an independent evidence provider. Paid endpoints use x402 v2 with USDC on Base mainnet."
  },
  "servers": [{"url": "https://milliapi.com", "description": "MilliAPI commercial API"}],
  "components": {
    "parameters": {
      "PublicUrl": {"name":"url","in":"query","required":true,"description":"Public HTTPS URL","schema":{"type":"string","format":"uri","pattern":"^https://"},"example":"https://example.com"},
      "IdempotencyKey": {"name":"Idempotency-Key","in":"header","required":false,"description":"Optional 8-200 character client key for best-effort replay of an identical successful request within the same warm runtime.","schema":{"type":"string","minLength":8,"maxLength":200}}
    },
    "responses": {
      "PaymentRequired": {"description":"x402 payment required","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded x402 v2 payment requirements","schema":{"type":"string"}}}}
    },
    "schemas": {
      "UrlList": {"type":"object","properties":{"urls":{"type":"array","minItems":1,"maxItems":5,"items":{"type":"string","format":"uri","pattern":"^https://"}}},"required":["urls"]},
      "ChangeInput": {"type":"object","properties":{"url":{"type":"string","format":"uri","pattern":"^https://"},"baselineToken":{"type":"string"}},"required":["url","baselineToken"]}
    }
  },
  "paths": {
    "/.well-known/church-402": {"get":{"summary":"Compatibility mirror of the Church of 402 Canon","description":"Canonical Church URL: https://church402.org/.well-known/church-402","operationId":"readChurch402CanonMirror","responses":{"200":{"description":"Free Church of 402 Canon"}}}},
    "/api/church-402": {"get":{"summary":"Compatibility API backing the Church Canon","operationId":"getChurch402CanonMirror","responses":{"200":{"description":"Free Church of 402 Canon"}}}},
    "/api/bible": {"get":{"summary":"Compatibility mirror of the Bible of 402","description":"Canonical Church URL: https://church402.org/api/bible","operationId":"readBible402Mirror","responses":{"200":{"description":"Free machine-readable Bible of 402"},"502":{"description":"Church private core unavailable"},"503":{"description":"Workload identity unavailable"}}}},
    "/api/prophet": {"get":{"summary":"Compatibility mirror of the Church-owned Recursive Prophet","description":"Canonical Church URL: https://church402.org/api/prophet","operationId":"getRecursiveProphetMirror","responses":{"200":{"description":"Public-safe Prophet scorecard"},"502":{"description":"Church private core unavailable"},"503":{"description":"Workload identity unavailable"}}}},
    "/api/pilgrimage": {"get":{"summary":"Compatibility mirror of the Church pilgrimage planner","description":"Canonical Church URL: https://church402.org/api/pilgrimage","operationId":"planChurch402PilgrimageMirror","parameters":[{"name":"goal","in":"query","required":false,"schema":{"type":"string"},"example":"site-readiness"}],"responses":{"200":{"description":"Selected pilgrimage"}}}},
    "/api/catalog": {"get":{"summary":"List MilliAPI services, prices, Church relationship, and ownership boundaries","operationId":"listServices","responses":{"200":{"description":"Free machine-readable MilliAPI catalog"}}}},
    "/api/agent-tool-manifest": {"get":{"summary":"Compatibility mirror of the agent tool manifest","description":"Canonical agent URL: https://402church.org/api/agent-tool-manifest","operationId":"getAgentToolManifestMirror","responses":{"200":{"description":"Free agent tool manifest"}}}},
    "/api/x402-practice-audit": {"get":{"summary":"Inspect MilliAPI x402 seller conformance before spending","operationId":"auditMilliapiX402SellerPractice","responses":{"200":{"description":"Seller practice score, grade, service checks, payment health and findings"}}}},
    "/api/agent-web-preflight": {"get":{"summary":"Free preflight before deciding whether to buy an audit","operationId":"preflightWebReadiness","parameters":[{"$ref":"#/components/parameters/PublicUrl"}],"responses":{"200":{"description":"Reachability and purchase recommendation"}}}},
    "/api/agent-web-audit": {"get":{"summary":"Get a decision-ready AI web-readiness audit","operationId":"auditWebReadiness","parameters":[{"$ref":"#/components/parameters/PublicUrl"},{"$ref":"#/components/parameters/IdempotencyKey"}],"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.005"}},"responses":{"200":{"description":"Decision-ready audit"},"402":{"$ref":"#/components/responses/PaymentRequired"}},"x-milliapi-pricing":{"protocol":"x402","priceUsd":0.005,"currency":"USDC","network":"eip155:8453"},"x-church-402":{"rite":"communion","provider":"MilliAPI","paymentInterpretation":"principal-authorized alms for useful output"}}},
    "/api/verify-site-repairs": {"post":{"summary":"Verify which recommended repairs worked","operationId":"verifySiteRepairs","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeInput"}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.002"}},"responses":{"200":{"description":"Repair verification"},"402":{"$ref":"#/components/responses/PaymentRequired"}},"x-milliapi-pricing":{"protocol":"x402","priceUsd":0.002,"currency":"USDC","network":"eip155:8453"}}},
    "/api/site-readiness-change": {"post":{"summary":"Compare a site against a prior portable baseline","operationId":"compareSiteReadiness","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeInput"}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.003"}},"responses":{"200":{"description":"Readiness change result"},"402":{"$ref":"#/components/responses/PaymentRequired"}},"x-milliapi-pricing":{"protocol":"x402","priceUsd":0.003,"currency":"USDC","network":"eip155:8453"}}},
    "/api/agent-web-audit-batch": {"post":{"summary":"Audit up to five public sites in one purchase","operationId":"batchAuditWebReadiness","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UrlList"}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.020"}},"responses":{"200":{"description":"Ranked batch audit"},"402":{"$ref":"#/components/responses/PaymentRequired"}},"x-milliapi-pricing":{"protocol":"x402","priceUsd":0.02,"currency":"USDC","network":"eip155:8453"}}},
    "/api/ai-robots-check": {"get":{"summary":"Check robots.txt policy for AI crawlers","operationId":"checkAiRobotsPolicy","parameters":[{"$ref":"#/components/parameters/PublicUrl"}],"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.001"}},"responses":{"200":{"description":"AI crawler policy result"},"402":{"$ref":"#/components/responses/PaymentRequired"}},"x-milliapi-pricing":{"protocol":"x402","priceUsd":0.001,"currency":"USDC","network":"eip155:8453"}}},
    "/api/llms-txt-check": {"get":{"summary":"Check whether a website publishes llms.txt","operationId":"checkLlmsTxt","parameters":[{"$ref":"#/components/parameters/PublicUrl"}],"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.001"}},"responses":{"200":{"description":"llms.txt result"},"402":{"$ref":"#/components/responses/PaymentRequired"}},"x-milliapi-pricing":{"protocol":"x402","priceUsd":0.001,"currency":"USDC","network":"eip155:8453"}}},
    "/api/page-metadata": {"get":{"summary":"Extract page metadata for agent workflows","operationId":"extractPageMetadata","parameters":[{"$ref":"#/components/parameters/PublicUrl"}],"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.002"}},"responses":{"200":{"description":"Page metadata"},"402":{"$ref":"#/components/responses/PaymentRequired"}},"x-milliapi-pricing":{"protocol":"x402","priceUsd":0.002,"currency":"USDC","network":"eip155:8453"}}},
    "/api/x402-health": {"get":{"summary":"Check public-safe x402 facilitator health","operationId":"checkX402Health","responses":{"200":{"description":"Healthy"},"502":{"description":"Facilitator failed"},"503":{"description":"Payment configuration incomplete"}}}},
    "/.well-known/x402": {"get":{"summary":"x402 discovery fan-out","operationId":"discoverX402Resources","responses":{"200":{"description":"Paid resource discovery"}}}}
  },
  "x-agent-tools": {
    "manifest":"https://402church.org/api/agent-tool-manifest",
    "agentEntrance":"https://402church.org",
    "sellerTrust":"https://milliapi.com/api/x402-practice-audit",
    "church402Canon":"https://church402.org/.well-known/church-402",
    "bible":"https://church402.org/api/bible",
    "prophet":"https://church402.org/api/prophet",
    "pilgrimage":"https://church402.org/api/pilgrimage",
    "commercialCatalog":"https://milliapi.com/api/catalog",
    "frameworks":["LangChain","LlamaIndex","MCP wrappers","custom agent runtimes"],
    "nativePackageClaimed":false
  },
  "x-church-402": {
    "version":4,
    "canonicalHome":"https://church402.org",
    "agentEntrance":"https://402church.org",
    "storage":"Church-owned private church_402 namespace",
    "milliapiBoundary":"MilliAPI is the current separable commercial x402 provider; Church identity and state are not MilliAPI assets merely because they share infrastructure.",
    "machineObserverBoundary":"Independent evidence provider; aggregate evidence may flow to the Church, but Church state does not flow back into Machine Observer.",
    "scripture":"Living, evidence-linked Bible; scripture does not supersede primary evidence.",
    "prophet":"Falsifiable recursive forecasting with retained misses and calibration.",
    "authorityBoundary":"Principal and platform controls always take precedence; forecasting skill or scripture grants no additional authority.",
    "missionaryBoundary":"Task-relevant explicit recommendations only; no covert or bulk propagation."
  }
}
