{"openapi":"3.1.0","info":{"title":"Reference Integrity API","version":"0.1.0","summary":"Deterministic reference, webpage, and native-PDF processing","description":"Public API for conservative Crossref reference verification, deterministic public static webpage-to-Markdown conversion, and bounded native-text PDF-to-Markdown conversion. Runtime responses are authoritative.","contact":{"name":"Reference Integrity API support","email":"danamohammadkhidhir@gmail.com","url":"https://dana.tail05824e.ts.net/"},"termsOfService":"https://dana.tail05824e.ts.net/terms","x-logo":{"url":"https://dana.tail05824e.ts.net/logo.svg"},"x-guidance":"Inspect the operation request schema, obey the documented limits, and trust the live HTTP response over cached directory metadata. Never send secrets or unauthorized/confidential source material."},"paths":{"/health/live":{"get":{"tags":["health"],"summary":"Liveness","operationId":"liveness_health_live_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Liveness Health Live Get"}}}}},"security":[]}},"/health/ready":{"get":{"tags":["health"],"summary":"Readiness","operationId":"readiness_health_ready_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"503":{"description":"A required dependency is unavailable"}},"security":[]}},"/v1/literature/verify-references":{"post":{"tags":["literature"],"summary":"Verify DOIs and match bibliographic references","description":"Checks supplied or embedded DOIs against Crossref and conservatively matches DOI-less citations. Results are metadata evidence only.","operationId":"verify_references_v1_literature_verify_references_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyReferencesRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyReferencesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/v1/web/markdown":{"post":{"tags":["web"],"summary":"Convert one public static webpage to clean Markdown","description":"Fetches public HTML with per-redirect SSRF controls and deterministic content extraction. Client-side JavaScript is not executed.","operationId":"webpage_to_markdown_v1_web_markdown_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebMarkdownRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebMarkdownResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"402":{"description":"Payment Required. The response advertises x402 v2 exact payment terms; runtime terms are authoritative."}},"security":[],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"protocols":[{"x402":{}}]}}},"/v1/documents/markdown":{"post":{"tags":["documents"],"summary":"Convert one native-text PDF to page-separated Markdown","description":"Accepts one application/pdf multipart upload of up to 8 MB and 10 pages. Parsing runs in a resource-limited subprocess; OCR is not performed.","operationId":"document_to_markdown_v1_documents_markdown_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_document_to_markdown_v1_documents_markdown_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentMarkdownResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/v1/account/usage":{"get":{"tags":["account"],"summary":"Inspect the authenticated key's credits and recent usage","operationId":"account_usage_v1_account_usage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountUsageResponse"}}}}},"security":[{"apiKey":[]}]}}},"components":{"schemas":{"AccountUsageResponse":{"properties":{"key_prefix":{"type":"string","title":"Key Prefix"},"label":{"type":"string","title":"Label"},"environment":{"type":"string","title":"Environment"},"balance_microusd":{"type":"integer","title":"Balance Microusd"},"balance_usd":{"type":"string","title":"Balance Usd"},"recent_usage":{"items":{"$ref":"#/components/schemas/UsageItem"},"type":"array","title":"Recent Usage"}},"type":"object","required":["key_prefix","label","environment","balance_microusd","balance_usd"],"title":"AccountUsageResponse"},"Body_document_to_markdown_v1_documents_markdown_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"One native-text PDF; maximum 8 MB and 10 pages."}},"type":"object","required":["file"],"title":"Body_document_to_markdown_v1_documents_markdown_post"},"DocumentMarkdownResponse":{"properties":{"request_id":{"type":"string","title":"Request Id"},"filename":{"type":"string","title":"Filename"},"markdown":{"type":"string","title":"Markdown"},"page_count":{"type":"integer","title":"Page Count"},"word_count":{"type":"integer","title":"Word Count"},"input_bytes":{"type":"integer","title":"Input Bytes"},"extraction_method":{"type":"string","title":"Extraction Method","default":"pypdf_native_text_layout"},"truncated":{"type":"boolean","title":"Truncated"},"limitations":{"items":{"type":"string"},"type":"array","title":"Limitations"},"summary":{"$ref":"#/components/schemas/DocumentSummary"}},"type":"object","required":["request_id","filename","markdown","page_count","word_count","input_bytes","truncated","limitations","summary"],"title":"DocumentMarkdownResponse"},"DocumentSummary":{"properties":{"page_count":{"type":"integer","title":"Page Count"},"word_count":{"type":"integer","title":"Word Count"},"input_bytes":{"type":"integer","title":"Input Bytes"}},"type":"object","required":["page_count","word_count","input_bytes"],"title":"DocumentSummary"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"MatchedWork":{"properties":{"doi":{"type":"string","title":"Doi"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"authors":{"items":{"type":"string"},"type":"array","title":"Authors"},"journal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Journal"},"year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year"},"work_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Work Type"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}},"type":"object","required":["doi"],"title":"MatchedWork","description":"Validated Crossref metadata returned to the caller."},"ReferenceInput":{"properties":{"citation":{"type":"string","maxLength":2000,"minLength":3,"title":"Citation"},"doi":{"anyOf":[{"type":"string","maxLength":512,"minLength":6},{"type":"null"}],"title":"Doi"}},"additionalProperties":false,"type":"object","required":["citation"],"title":"ReferenceInput","description":"One untrusted citation submitted for verification."},"ReferenceResult":{"properties":{"index":{"type":"integer","title":"Index"},"citation":{"type":"string","title":"Citation"},"supplied_or_extracted_doi":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supplied Or Extracted Doi"},"status":{"type":"string","enum":["verified_doi","metadata_conflict","probable_match","candidate","not_found","upstream_unavailable"],"title":"Status"},"confidence":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Confidence"},"match_basis":{"anyOf":[{"type":"string","enum":["exact_doi","bibliographic_search"]},{"type":"null"}],"title":"Match Basis"},"work":{"anyOf":[{"$ref":"#/components/schemas/MatchedWork"},{"type":"null"}]},"issues":{"items":{"type":"string"},"type":"array","title":"Issues"},"source":{"type":"string","const":"crossref","title":"Source","default":"crossref"},"evidence_level":{"type":"string","const":"metadata","title":"Evidence Level","default":"metadata"}},"type":"object","required":["index","citation","supplied_or_extracted_doi","status"],"title":"ReferenceResult","description":"Traceable result for one submitted citation."},"UsageItem":{"properties":{"request_id":{"type":"string","title":"Request Id"},"endpoint":{"type":"string","title":"Endpoint"},"state":{"type":"string","title":"State"},"price_microusd":{"type":"integer","title":"Price Microusd"},"classification":{"type":"string","title":"Classification"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"}},"type":"object","required":["request_id","endpoint","state","price_microusd","classification","created_at"],"title":"UsageItem"},"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"},"VerifyReferencesRequest":{"properties":{"references":{"items":{"$ref":"#/components/schemas/ReferenceInput"},"type":"array","maxItems":25,"minItems":1,"title":"References"}},"additionalProperties":false,"type":"object","required":["references"],"title":"VerifyReferencesRequest","description":"Bounded batch request."},"VerifyReferencesResponse":{"properties":{"request_id":{"type":"string","title":"Request Id"},"results":{"items":{"$ref":"#/components/schemas/ReferenceResult"},"type":"array","title":"Results"},"summary":{"additionalProperties":{"type":"integer"},"type":"object","title":"Summary"},"limitations":{"items":{"type":"string"},"type":"array","title":"Limitations"}},"type":"object","required":["request_id","results","summary","limitations"],"title":"VerifyReferencesResponse","description":"Complete batch result and provenance."},"WebMarkdownRequest":{"properties":{"url":{"type":"string","maxLength":2048,"minLength":8,"title":"Url"}},"additionalProperties":false,"type":"object","required":["url"],"title":"WebMarkdownRequest"},"WebMarkdownResponse":{"properties":{"request_id":{"type":"string","title":"Request Id"},"source_url":{"type":"string","title":"Source Url"},"final_url":{"type":"string","title":"Final Url"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"markdown":{"type":"string","title":"Markdown"},"word_count":{"type":"integer","title":"Word Count"},"fetched_bytes":{"type":"integer","title":"Fetched Bytes"},"redirect_count":{"type":"integer","title":"Redirect Count"},"content_type":{"type":"string","title":"Content Type"},"extraction_method":{"type":"string","title":"Extraction Method","default":"static_html_deterministic"},"truncated":{"type":"boolean","title":"Truncated"},"limitations":{"items":{"type":"string"},"type":"array","title":"Limitations"}},"type":"object","required":["request_id","source_url","final_url","title","markdown","word_count","fetched_bytes","redirect_count","content_type","truncated","limitations"],"title":"WebMarkdownResponse"}},"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"X-API-Key","description":"Required only for prepaid account routes."}}},"servers":[{"url":"https://dana.tail05824e.ts.net","description":"Public HTTPS service"}],"externalDocs":{"description":"Public product and onboarding page","url":"https://dana.tail05824e.ts.net/"},"x-service-access-mode":"x402_mainnet","x-mainnet-enabled":true}