{"openapi":"3.1.0","info":{"title":"Mart402","description":"Pay-per-call extraction APIs for AI agents: web extraction, PDF parsing with hallucination-guarded OCR, invoice verification, schema-driven extraction, and JP company profiles. Payment via x402 (USDC on Base) - no account, no API key. Docs: /agents.md","version":"0.1.0"},"paths":{"/llms.txt":{"get":{"summary":"Llms Txt","operationId":"llms_txt_llms_txt_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/agents.md":{"get":{"summary":"Agents Md","operationId":"agents_md_agents_md_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/.well-known/ai-catalog.json":{"get":{"summary":"Well Known","operationId":"well_known__well_known_ai_catalog_json_get","parameters":[{"name":"request","in":"query","required":false,"schema":{"title":"Request"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json; charset=utf-8":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/.well-known/x402":{"get":{"summary":"Well Known X402","description":"Machine-readable x402 discovery pointer: catalog, docs, paid endpoints.","operationId":"well_known_x402__well_known_x402_get","responses":{"200":{"description":"Successful Response","content":{"application/json; charset=utf-8":{"schema":{}}}}}}},"/robots.txt":{"get":{"summary":"Robots","operationId":"robots_robots_txt_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/sitemap.xml":{"get":{"summary":"Sitemap","operationId":"sitemap_sitemap_xml_get","responses":{"200":{"description":"Successful Response","content":{"application/json; charset=utf-8":{"schema":{}}}}}}},"/.well-known/agent.json":{"get":{"summary":"Agent Card","description":"A2A-format agent card (discovery surface).","operationId":"agent_card__well_known_agent_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json; charset=utf-8":{"schema":{}}}}}}},"/":{"get":{"summary":"Landing","operationId":"landing__get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/ocr":{"get":{"summary":"Ocr Page","operationId":"ocr_page_ocr_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/terms":{"get":{"summary":"Terms","operationId":"terms_terms_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/v1/receipts/{receipt_id}":{"get":{"summary":"Get Receipt","description":"Free re-fetch of any paid result (payments are never lost). Charter art. 1.","operationId":"get_receipt_v1_receipts__receipt_id__get","parameters":[{"name":"receipt_id","in":"path","required":true,"schema":{"type":"string","title":"Receipt Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json; charset=utf-8":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/healthz":{"get":{"summary":"Healthz","operationId":"healthz_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json; charset=utf-8":{"schema":{}}}}}}},"/catalog":{"get":{"summary":"Catalog","operationId":"catalog_catalog_get","responses":{"200":{"description":"Successful Response","content":{"application/json; charset=utf-8":{"schema":{}}}}}}},"/stats":{"get":{"summary":"Public Stats","description":"Measured latency and success rates, public (charter art. 6).","operationId":"public_stats_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json; charset=utf-8":{"schema":{}}}}}}},"/stats/admin":{"get":{"summary":"Admin Stats","operationId":"admin_stats_stats_admin_get","responses":{"200":{"description":"Successful Response","content":{"application/json; charset=utf-8":{"schema":{}}}}}}},"/v1/extract":{"post":{"summary":"Extract Endpoint","operationId":"extract_endpoint_v1_extract_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractReq"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json; charset=utf-8":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/parse/quote":{"post":{"summary":"Parse Quote","description":"Free quote: fetches the PDF and returns page count, route, and the final price.","operationId":"parse_quote_v1_parse_quote_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteReq"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json; charset=utf-8":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/parse":{"post":{"summary":"Parse Endpoint","operationId":"parse_endpoint_v1_parse_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParseReq"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json; charset=utf-8":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/enrich":{"post":{"summary":"Enrich Endpoint","description":"Company name/domain/URL -> verified profile (evidence + confidence + registry).","operationId":"enrich_endpoint_v1_enrich_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichReq"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json; charset=utf-8":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/verify":{"post":{"summary":"Verify Endpoint","description":"Invoice field verification: tax math, JP invoice registration check-digit, accounting-ready JSON.","operationId":"verify_endpoint_v1_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyReq"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json; charset=utf-8":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/ocr":{"post":{"summary":"Ocr Endpoint","description":"Single image -> text + hallucination-guarded quality (dual-engine consensus).","operationId":"ocr_endpoint_v1_ocr_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OcrReq"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json; charset=utf-8":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/structured":{"post":{"summary":"Structured Endpoint","operationId":"structured_endpoint_v1_structured_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredReq"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json; charset=utf-8":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/jp-company":{"post":{"summary":"Jp Company Endpoint","description":"Japanese company site -> standard profile JSON (a preset of /v1/structured).","operationId":"jp_company_endpoint_v1_jp_company_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JpCompanyReq"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json; charset=utf-8":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mcp":{"post":{"summary":"Mcp Http","operationId":"mcp_http_mcp_post","responses":{"200":{"description":"Successful Response","content":{"application/json; charset=utf-8":{"schema":{}}}}}}}},"components":{"schemas":{"EnrichReq":{"properties":{"company":{"type":"string","title":"Company"},"country_hint":{"type":"string","title":"Country Hint","default":""}},"type":"object","required":["company"],"title":"EnrichReq"},"ExtractReq":{"properties":{"url":{"type":"string","title":"Url"},"mode":{"type":"string","title":"Mode","default":"auto"},"ttl":{"type":"integer","title":"Ttl","default":86400}},"type":"object","required":["url"],"title":"ExtractReq"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"JpCompanyReq":{"properties":{"url":{"type":"string","title":"Url"}},"type":"object","required":["url"],"title":"JpCompanyReq"},"OcrReq":{"properties":{"image_url":{"type":"string","title":"Image Url"},"image_base64":{"type":"string","title":"Image Base64"},"lang":{"type":"string","title":"Lang","default":"japanese"}},"type":"object","title":"OcrReq"},"ParseReq":{"properties":{"quote_id":{"type":"string","title":"Quote Id"}},"type":"object","required":["quote_id"],"title":"ParseReq"},"QuoteReq":{"properties":{"url":{"type":"string","title":"Url"}},"type":"object","required":["url"],"title":"QuoteReq"},"StructuredReq":{"properties":{"url":{"type":"string","title":"Url"},"schema":{"additionalProperties":true,"type":"object","title":"Schema"},"instructions":{"type":"string","title":"Instructions","default":""}},"type":"object","required":["url","schema"],"title":"StructuredReq"},"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"},"VerifyReq":{"properties":{"fields":{"additionalProperties":true,"type":"object","title":"Fields"},"line_items":{"items":{},"type":"array","title":"Line Items"}},"type":"object","required":["fields"],"title":"VerifyReq"}}}}