{"auth":{"header":"Authorization: Bearer \u003capi_key\u003e","obtain":"POST /register with email and password","recover":"POST /register with the same email and password to retrieve your existing key","type":"Bearer token"},"description":"Structured PDF extraction API. Parse any PDF into a semantic AST — JSON, Markdown, HTML, plain text, or LLM-ready chunks. No RAG pipeline needed.","endpoints":[{"auth":false,"description":"Register for an API key. 10 free calls, no payment needed.","method":"POST","path":"/register","request":{"body":{"email":"you@example.com","password":"your-password"},"content_type":"application/json"},"response":{"api_key":"frompdf_...","usage_limit":"10"}},{"auth":true,"description":"Extract structured content from a PDF. Scanned PDFs with invisible OCR text layers are automatically detected. Costs 1 credit.","method":"POST","path":"/v1/extract","request":{"content_type":"multipart/form-data","fields":{"file":"(required) PDF file","format":"(optional) json, markdown, html, text, chunks — default: json","password":"(optional) PDF password for encrypted documents"}}},{"auth":true,"description":"Compare two PDFs and return a semantic diff. Costs 2 credits.","method":"POST","path":"/v1/diff","request":{"content_type":"multipart/form-data","fields":{"file_a":"(required) first PDF","file_b":"(required) second PDF"}}},{"auth":true,"description":"Compute a readability score (0-100) for a PDF. Costs 1 credit.","method":"POST","path":"/v1/score","request":{"content_type":"multipart/form-data","fields":{"file":"(required) PDF file"}}},{"auth":true,"description":"Check credits remaining and payment status. Free, no credits charged.","method":"GET","path":"/v1/usage","response":{"credits_remaining":"free credits left","free_tier_limit":"free credit allowance","paid":"true if subscribed via Stripe","usage_count":"total credits consumed"}},{"auth":true,"description":"Submit a bug report or feature request. Free, no credits charged.","method":"POST","path":"/v1/feedback","request":{"body":{"context":"(optional) relevant endpoint, error code, etc.","message":"(required) description, max 2000 chars","type":"(required) bug or feature"},"content_type":"application/json"}},{"auth":false,"description":"Health check. No auth required.","method":"GET","path":"/v1/health"}],"examples":{"diff":"curl -s -H \"Authorization: Bearer frompdf_...\" -F file_a=@v1.pdf -F file_b=@v2.pdf https://api.frompdf.dev/v1/diff","extract":"curl -s -H \"Authorization: Bearer frompdf_...\" -F file=@document.pdf https://api.frompdf.dev/v1/extract","feedback":"curl -s -X POST -H \"Authorization: Bearer frompdf_...\" -H \"Content-Type: application/json\" -d '{\"type\":\"bug\",\"message\":\"describe the issue\"}' https://api.frompdf.dev/v1/feedback","register":"curl -s -X POST -H \"Content-Type: application/json\" -d '{\"email\":\"you@example.com\",\"password\":\"your-password\"}' https://api.frompdf.dev/register","score":"curl -s -H \"Authorization: Bearer frompdf_...\" -F file=@document.pdf https://api.frompdf.dev/v1/score","usage":"curl -s -H \"Authorization: Bearer frompdf_...\" https://api.frompdf.dev/v1/usage"},"name":"pdf-ast","pricing":{"billing":"Usage-based via Stripe, billed monthly","costs":{"/v1/diff":"2 credits (two PDFs)","/v1/extract":"1 credit","/v1/score":"1 credit"},"free_tier":"10 credits free per key, no payment needed","rate":"$0.01 per credit","unit":"credit"},"version":"dev"}
