{"version":1,"resources":["https://tex.x.gl/v1/compile","https://tex.x.gl/v1/lint"],"x402Version":2,"service":{"name":"TeX402","version":"1.0.0","description":"Hardened x402-monetized LaTeX compilation and diagnostics API","mode":"mainnet","network":"eip155:8453","payTo":"0x5e18Dfb04F64e1D0d3593178a004A251506c2e16","baseUrl":"https://tex.x.gl","facilitator":"https://api.cdp.coinbase.com/platform/v2/x402","openapiUrl":"https://tex.x.gl/openapi.json","docsUrl":"https://tex.x.gl/docs","skillUrl":"https://tex.x.gl/skill.md","llmsTxtUrl":"https://tex.x.gl/llms.txt","llmsFullTxtUrl":"https://tex.x.gl/llms-full.txt","mcpDiscoveryUrl":"https://tex.x.gl/.well-known/mcp.json"},"endpoints":[{"method":"POST","path":"/v1/compile","url":"https://tex.x.gl/v1/compile","price":"$0.008","asset":"USDC","network":"eip155:8453","description":"Compile LaTeX (.tex) documents — resumes, CVs, arXiv papers, Beamer slide decks, technical reports, invoices, and TikZ diagrams — inside a hardened networkless TeX Live container, returning base64 PDF, 150-DPI PNG page previews, and structured diagnostics.","tags":["latex","pdf","compiler","resume","cv","arxiv","academic-paper","beamer","slides","report","invoice","tikz","typeset","diagnostics","x402"],"bazaar":{"info":{"input":{"type":"http","bodyType":"json","body":{"main_tex":"\\documentclass{article}\n\\begin{document}\nHello, TeX402!\n\\end{document}","files":{"refs.bib":"@article{knuth1984,\n  author = {Donald E. Knuth},\n  title = {Literate Programming},\n  journal = {The Computer Journal},\n  year = {1984}\n}"},"engine":"pdflatex","bibliography":false,"include_page_previews":true}},"output":{"type":"json","example":{"success":true,"pdf_base64":"JVBERi0xLjUNCi...","page_count":1,"page_previews_base64":["iVBORw0KGgoAAAANSUhEUgAA..."],"compile_time_ms":420,"diagnostics":[]}}},"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"input":{"type":"object","properties":{"type":{"type":"string","const":"http"},"method":{"type":"string","enum":["POST","PUT","PATCH"]},"bodyType":{"type":"string","enum":["json","form-data","text"]},"body":{"type":"object","properties":{"main_tex":{"type":"string","description":"Root LaTeX document source code (.tex)"},"files":{"type":"object","description":"Optional map of safe relative file paths (e.g. refs.bib, style.sty, fig.png) to UTF-8 strings or base64:... payloads","additionalProperties":{"type":"string"}},"engine":{"type":"string","enum":["pdflatex","xelatex"],"default":"pdflatex","description":"TeX engine used for compilation"},"bibliography":{"type":"boolean","default":false,"description":"Run multi-pass biber/bibtex bibliography compilation when true"},"include_page_previews":{"type":"boolean","default":false,"description":"Render 150-DPI PNG page previews via pdftoppm as base64 strings"}},"required":["main_tex"],"additionalProperties":false}},"required":["type","method","bodyType","body"],"additionalProperties":false},"output":{"type":"object","properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"success":{"type":"boolean"},"pdf_base64":{"type":["string","null"]},"page_count":{"type":"integer","minimum":0},"page_previews_base64":{"type":"array","items":{"type":"string"}},"compile_time_ms":{"type":"number","minimum":0},"diagnostics":{"type":"array","items":{"type":"object","properties":{"file":{"type":"string"},"line":{"type":["integer","null"]},"severity":{"type":"string","enum":["error","warning","info"]},"message":{"type":"string"},"context_snippet":{"type":"string"},"suggested_fix":{"type":"string"}},"required":["file","line","severity","message","context_snippet","suggested_fix"]}}},"required":["success","pdf_base64","page_count","page_previews_base64","compile_time_ms","diagnostics"]}},"required":["type"]}},"required":["input"]}}},{"method":"POST","path":"/v1/lint","url":"https://tex.x.gl/v1/lint","price":"$0.002","asset":"USDC","network":"eip155:8453","description":"Validate LaTeX (.tex) syntax and ChkTeX rules in sub-300ms (-draftmode) before PDF compilation — ideal for fast iterative drafting of papers, resumes, slides, and math.","tags":["latex","linter","syntax-check","diagnostics","chktex","pdflatex","xelatex","arxiv","resume","x402"],"bazaar":{"info":{"input":{"type":"http","bodyType":"json","body":{"main_tex":"\\documentclass{article}\n\\begin{document}\nFast draft check.\n\\end{document}","engine":"pdflatex"}},"output":{"type":"json","example":{"success":true,"valid":true,"compile_time_ms":145,"diagnostics":[]}}},"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"input":{"type":"object","properties":{"type":{"type":"string","const":"http"},"method":{"type":"string","enum":["POST","PUT","PATCH"]},"bodyType":{"type":"string","enum":["json","form-data","text"]},"body":{"type":"object","properties":{"main_tex":{"type":"string","description":"Root LaTeX document source code (.tex) to lint and validate"},"files":{"type":"object","description":"Optional map of relative paths to file contents","additionalProperties":{"type":"string"}},"engine":{"type":"string","enum":["pdflatex","xelatex"],"default":"pdflatex"}},"required":["main_tex"],"additionalProperties":false}},"required":["type","method","bodyType","body"],"additionalProperties":false},"output":{"type":"object","properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"success":{"type":"boolean"},"valid":{"type":"boolean"},"compile_time_ms":{"type":"number","minimum":0},"diagnostics":{"type":"array","items":{"type":"object","properties":{"file":{"type":"string"},"line":{"type":["integer","null"]},"severity":{"type":"string","enum":["error","warning","info"]},"message":{"type":"string"},"context_snippet":{"type":"string"},"suggested_fix":{"type":"string"}},"required":["file","line","severity","message","context_snippet","suggested_fix"]}}},"required":["success","valid","compile_time_ms","diagnostics"]}},"required":["type"]}},"required":["input"]}}}],"mcpTools":[{"name":"tex402_compile","description":"Compile LaTeX (.tex) documents — resumes, CVs, arXiv papers, Beamer slide decks, technical reports, invoices, and TikZ diagrams — inside a hardened networkless TeX Live container, returning base64 PDF, 150-DPI PNG page previews, and structured diagnostics.","endpoint":"https://tex.x.gl/v1/compile","method":"POST","priceUsd":"0.008","inputSchema":{"type":"object","properties":{"main_tex":{"type":"string","description":"Root LaTeX document source code (.tex)"},"files":{"type":"object","description":"Optional map of safe relative file paths (e.g. refs.bib, style.sty, fig.png) to UTF-8 strings or base64:... payloads","additionalProperties":{"type":"string"}},"engine":{"type":"string","enum":["pdflatex","xelatex"],"default":"pdflatex","description":"TeX engine used for compilation"},"bibliography":{"type":"boolean","default":false,"description":"Run multi-pass biber/bibtex bibliography compilation when true"},"include_page_previews":{"type":"boolean","default":false,"description":"Render 150-DPI PNG page previews via pdftoppm as base64 strings"}},"required":["main_tex"],"additionalProperties":false}},{"name":"tex402_lint","description":"Validate LaTeX (.tex) syntax and ChkTeX rules in sub-300ms (-draftmode) before PDF compilation — ideal for fast iterative drafting of papers, resumes, slides, and math.","endpoint":"https://tex.x.gl/v1/lint","method":"POST","priceUsd":"0.002","inputSchema":{"type":"object","properties":{"main_tex":{"type":"string","description":"Root LaTeX document source code (.tex) to lint and validate"},"files":{"type":"object","description":"Optional map of relative paths to file contents","additionalProperties":{"type":"string"}},"engine":{"type":"string","enum":["pdflatex","xelatex"],"default":"pdflatex"}},"required":["main_tex"],"additionalProperties":false}}]}