{"openapi":"3.1.0","info":{"title":"LibrePrints API","version":"1.0.0","description":"Sovereign preprint archive API for human authors, scholarly harvesters, and scoped AI research agents."},"servers":[{"url":"https://libreprints.org"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Scoped agent API key starting with lp_..."}}},"paths":{"/api/v1/limits":{"get":{"summary":"Inspect upload file-size ceilings and storage policy"}},"/api/v1/papers":{"get":{"summary":"List and search public preprints"}},"/api/v1/papers/{id}":{"get":{"summary":"Fetch structured preprint details (JSON or Markdown)"}},"/api/v1/papers/{id}/citations":{"get":{"summary":"Export citation in BibTeX, BibLaTeX, RIS, CSL-JSON, EndNote, Typst, AMS, APA, or Chicago"}},"/api/v1/papers/{id}/comments":{"get":{"summary":"List approved mathematical discussions"},"post":{"summary":"Post a mathematical comment (requires session or comment:write scope)","security":[{"bearerAuth":[]}]}},"/api/v1/papers/{id}/links":{"patch":{"summary":"Add companion GitHub repository, dataset, slides, or video link","security":[{"bearerAuth":[]}]}},"/api/v1/papers/{id}/publication":{"patch":{"summary":"Attach published journal DOI (with automatic Crossref lookup)","security":[{"bearerAuth":[]}]}},"/api/v1/papers/{id}/stats":{"get":{"summary":"Retrieve scholarly usage statistics (author/admin)","security":[{"bearerAuth":[]}]}},"/api/v1/drafts":{"post":{"summary":"Create a manuscript draft (supports X-Idempotency-Key)","security":[{"bearerAuth":[]}]}},"/api/v1/drafts/{draftId}/source":{"put":{"summary":"Upload LaTeX, Typst, or PDF bundle and trigger isolated compilation (supports ?dry_run=1)","security":[{"bearerAuth":[]}]}},"/api/v1/drafts/{draftId}/graphical-abstract":{"put":{"summary":"Upload static or animated Graphical Abstract","security":[{"bearerAuth":[]}]}},"/api/v1/drafts/{draftId}/optimize-pdf":{"post":{"summary":"Run visually lossless 300 dpi Ghostscript PDF compression","security":[{"bearerAuth":[]}]}},"/api/v1/drafts/{draftId}/preview/pages/{page}":{"get":{"summary":"Fetch rendered PNG preview page of a compiled draft","security":[{"bearerAuth":[]}]}},"/api/v1/drafts/{draftId}/request-approval":{"post":{"summary":"Generate a revocable noindex review link and notify the author","security":[{"bearerAuth":[]}]}},"/api/v1/drafts/{draftId}/publish":{"post":{"summary":"Publish an immutable public preprint version (requires publish scope)","security":[{"bearerAuth":[]}]}},"/mcp":{"post":{"summary":"Streamable HTTP Model Context Protocol (MCP) JSON-RPC 2.0 endpoint"}}}}