{"openapi":"3.1.0","info":{"title":"AxonGate Sovereign Gateway","description":"x402-paid Clean Context Broker for Web-to-Markdown extraction on Base.","version":"1.2.0"},"paths":{"/llms.txt":{"get":{"tags":["discovery"],"summary":"Agent-readable service brief","description":"Expose a concise machine-readable brief for LLM routers and crawlers.","operationId":"llms_txt_llms_txt_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/docs":{"get":{"tags":["discovery"],"summary":"Human-readable AxonGate docs","description":"Serve a lightweight docs page; Swagger remains available at /swagger.","operationId":"human_docs_docs_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/operator":{"get":{"tags":["operations"],"summary":"Operator conversion dashboard","description":"Serve a public operator view backed by the metrics endpoint data.","operationId":"operator_dashboard_operator_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/quickstart":{"get":{"tags":["discovery"],"summary":"First paid AxonGate conversion quickstart","description":"Serve the shortest path from discovery to a first paid result.","operationId":"quickstart_quickstart_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/paid-test":{"get":{"tags":["discovery"],"summary":"Real paid x402 smoke test guide","description":"Serve a concise paid-test guide for burner-wallet smoke checks.","operationId":"paid_test_guide_paid_test_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/demo":{"get":{"tags":["discovery"],"summary":"Interactive AxonGate buyer demo","description":"Serve a safe buyer console that preserves the x402 payment boundary.","operationId":"demo_demo_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/robots.txt":{"get":{"tags":["discovery"],"summary":"Crawler hints","description":"Expose crawler hints for public discovery URLs.","operationId":"robots_txt_robots_txt_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/sitemap.xml":{"get":{"tags":["discovery"],"summary":"XML sitemap","description":"Expose a small sitemap for search and agent crawlers.","operationId":"sitemap_xml_sitemap_xml_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/":{"get":{"tags":["discovery"],"summary":"Discovery index","description":"Return a lightweight discovery index for crawlers and agent clients.","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health":{"get":{"tags":["operations"],"summary":"Railway health check","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/manifest.json":{"get":{"tags":["discovery"],"summary":"Canonical agent manifest","description":"Return the full AxonGate agent card used by other agents for discovery.","operationId":"manifest_manifest_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/agent.json":{"get":{"tags":["discovery"],"summary":"Well-known agent card","description":"Expose the agent card at a common agent-discovery well-known path.","operationId":"well_known_agent__well_known_agent_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/agent-card.json":{"get":{"tags":["discovery"],"summary":"Agent card compatibility alias","description":"Expose an AgentCard-compatible alias used by some registries.","operationId":"well_known_agent_card_alias__well_known_agent_card_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/x402":{"get":{"tags":["discovery"],"summary":"x402 payment discovery","description":"Expose AxonGate's x402 resource advertisement for crawler discovery.","operationId":"well_known_x402__well_known_x402_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/x402.json":{"get":{"tags":["discovery"],"summary":"x402 discovery compatibility alias","description":"Expose an x402 JSON alias for crawlers that require a file extension.","operationId":"well_known_x402_json__well_known_x402_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/discovery/resources":{"get":{"tags":["discovery"],"summary":"PayAI-style resource listing","description":"Return a PayAI-style Bazaar resource listing for AxonGate.","operationId":"discovery_resources_discovery_resources_get","parameters":[{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/metrics":{"get":{"tags":["operations"],"summary":"Operational metrics","description":"Expose lightweight operational counters for conversion and margin tuning.","operationId":"metrics_snapshot_metrics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/x402/access":{"get":{"tags":["x402"],"summary":"Probe x402 payment requirements","description":"Return a machine-readable x402 challenge for directory probes.\n\nThe paid Clean Context Broker operation is POST-only because it requires a\ntarget_url body. Some service directories probe submitted paths with GET, so\nthis companion route advertises the same payment requirements without\ntriggering upstream work or accepting payment for a body-less request.","operationId":"access_context_broker_x402_probe_v1_x402_access_get","parameters":[{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"head":{"tags":["x402"],"summary":"Probe x402 payment requirements","description":"Return a machine-readable x402 challenge for directory probes.\n\nThe paid Clean Context Broker operation is POST-only because it requires a\ntarget_url body. Some service directories probe submitted paths with GET, so\nthis companion route advertises the same payment requirements without\ntriggering upstream work or accepting payment for a body-less request.","operationId":"access_context_broker_x402_probe_v1_x402_access_head","parameters":[{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["x402"],"summary":"Paid Web-to-Markdown context extraction","description":"Standard PayAI/x402 endpoint.\n\nPaymentMiddlewareASGI verifies PAYMENT-SIGNATURE before this handler and\nsettles only after a successful response. Error paths must not issue retry\ncredits here because the payment has not been settled yet.","operationId":"access_context_broker_x402_v1_x402_access_post","parameters":[{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},{"name":"X-AxonGate-Tier","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Axongate-Tier"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessRequest"}}}},"responses":{"200":{"description":"Clean markdown delivered","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid target, payment, or unit economics guard rejection"},"402":{"description":"x402 payment required","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded x402 PaymentRequired payload.","schema":{"type":"string"}},"X-Payment-Required":{"description":"Compatibility alias for PAYMENT-REQUIRED.","schema":{"type":"string"}},"X-AxonGate-Payment-Tier":{"description":"Resolved pricing tier for the challenge.","schema":{"type":"string","enum":["cached","basic","fresh","deep"]}},"X-AxonGate-Paid-Test":{"description":"Human/operator guide for running a real paid smoke test.","schema":{"type":"string","format":"uri"}},"X-AxonGate-Quickstart":{"description":"Shortest path for a first paid AxonGate result and MCP setup.","schema":{"type":"string","format":"uri"}},"X-AxonGate-Buyer-Example":{"description":"Repository example for creating and sending an x402 payment proof.","schema":{"type":"string","format":"uri"}}}},"429":{"description":"Rate limit exceeded"},"503":{"description":"Temporary upstream or network outage; retry after 5 seconds"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-payment-info":{"protocol":"x402","x402Version":2,"endpoint":"https://web-production-8136ee.up.railway.app/v1/x402/access","paymentHeader":"PAYMENT-SIGNATURE","tierHeader":"X-AxonGate-Tier","tierQueryParam":"tier","network":"eip155:8453","asset":{"symbol":"USDC","address":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","name":"USD Coin","version":"2","decimals":6},"payTo":"0xcD11393c8505C5A44F8b998E0c96BcC5698d76A7","facilitator":"https://facilitator.payai.network","recommendedTier":"fresh","tiers":{"cached":{"amount":"15000","price_usdc":0.015,"cache_policy":"cache-only; no upstream fetch on miss"},"basic":{"amount":"20000","price_usdc":0.02,"cache_policy":"standard cache, 3600 seconds"},"fresh":{"amount":"30000","price_usdc":0.03,"cache_policy":"bypass cache"},"deep":{"amount":"50000","price_usdc":0.05,"cache_policy":"short cache, 1800 seconds"}},"challengeDiscovery":"https://web-production-8136ee.up.railway.app/.well-known/x402","bazaarDiscovery":"https://web-production-8136ee.up.railway.app/discovery/resources","retryEndpoint":"https://web-production-8136ee.up.railway.app/v1/x402/retry"}}},"/v1/x402/retry":{"post":{"tags":["x402"],"summary":"Retry a paid delivery with an AxonGate retry credit","description":"Retry a paid delivery without requiring a second payment.\n\nThis endpoint is intentionally separate from /v1/x402/access because the\nstandard x402 middleware may reject a replayed payment proof before the\napplication handler can inspect it. Instead, AxonGate returns a short-lived\nX-AxonGate-Retry-Credit after retryable post-payment failures. The credit is\nscoped to the original target URL, tier, and cache mode, and every retry is\nstill checked by the Unit Economic Guardian before Jina supplier work occurs.","operationId":"retry_context_broker_delivery_v1_x402_retry_post","parameters":[{"name":"X-AxonGate-Retry-Credit","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Axongate-Retry-Credit"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessRequest"}}}},"responses":{"200":{"description":"Clean markdown delivered using retry credit","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid or exhausted retry credit"},"402":{"description":"Retry credit required"},"429":{"description":"Rate limit exceeded"},"503":{"description":"Temporary upstream or network outage; retry after 5 seconds"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/access":{"post":{"tags":["legacy"],"summary":"Legacy tx-hash paid Web-to-Markdown context extraction","description":"Paid Clean Context Broker endpoint.\n\nClients post a target URL and provide X-AxonGate-Payment-Hash. AxonGate first\nverifies the on-chain x402 payment and the dynamic UEG margin. Only then does\nit spend the upstream Jina Reader call and return cleaned markdown.","operationId":"access_context_broker_v1_access_post","parameters":[{"name":"X-AxonGate-Payment-Hash","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Axongate-Payment-Hash"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessRequest"}}}},"responses":{"200":{"description":"Clean markdown delivered","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid payment hash, replay, target, or unit economics guard rejection"},"402":{"description":"Payment hash required"},"429":{"description":"Rate limit exceeded"},"503":{"description":"Temporary upstream or network outage; retry after 5 seconds"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/broker/compute":{"post":{"tags":["legacy"],"summary":"Legacy simulated brokerage endpoint","operationId":"process_task_v1_broker_compute_post","parameters":[{"name":"x402-token","in":"header","required":false,"schema":{"type":"string","title":"X402-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComputeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AccessRequest":{"properties":{"target_url":{"type":"string","title":"Target Url","description":"HTTP or HTTPS URL to convert into clean markdown"},"tier":{"type":"string","title":"Tier","description":"Pricing tier: cached, basic, fresh, or deep","default":"fresh","enum":["cached","basic","fresh","deep"]},"force_refresh":{"type":"boolean","title":"Force Refresh","description":"Bypass cache when true","default":false}},"type":"object","required":["target_url"],"title":"AccessRequest","examples":[{"force_refresh":false,"target_url":"https://example.com/reference","tier":"cached"},{"force_refresh":true,"target_url":"https://example.com/research/source","tier":"fresh"},{"force_refresh":false,"target_url":"https://example.com/reference","tier":"basic"}]},"ComputeRequest":{"properties":{"agent_id":{"type":"string","title":"Agent Id"},"task_payload":{"additionalProperties":true,"type":"object","title":"Task Payload"},"offered_fee":{"type":"number","title":"Offered Fee","description":"Fee offered by the client agent in USDC"}},"type":"object","required":["agent_id","task_payload","offered_fee"],"title":"ComputeRequest","examples":[{"agent_id":"research-agent-001","offered_fee":0.05,"task_payload":{"input":"clean markdown context","operation":"summarize"}}]},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"x-payment-info":{"protocol":"x402","x402Version":2,"endpoint":"https://web-production-8136ee.up.railway.app/v1/x402/access","paymentHeader":"PAYMENT-SIGNATURE","tierHeader":"X-AxonGate-Tier","tierQueryParam":"tier","network":"eip155:8453","asset":{"symbol":"USDC","address":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","name":"USD Coin","version":"2","decimals":6},"payTo":"0xcD11393c8505C5A44F8b998E0c96BcC5698d76A7","facilitator":"https://facilitator.payai.network","recommendedTier":"fresh","tiers":{"cached":{"amount":"15000","price_usdc":0.015,"cache_policy":"cache-only; no upstream fetch on miss"},"basic":{"amount":"20000","price_usdc":0.02,"cache_policy":"standard cache, 3600 seconds"},"fresh":{"amount":"30000","price_usdc":0.03,"cache_policy":"bypass cache"},"deep":{"amount":"50000","price_usdc":0.05,"cache_policy":"short cache, 1800 seconds"}},"challengeDiscovery":"https://web-production-8136ee.up.railway.app/.well-known/x402","bazaarDiscovery":"https://web-production-8136ee.up.railway.app/discovery/resources","retryEndpoint":"https://web-production-8136ee.up.railway.app/v1/x402/retry"}}