API Documentation

Integrate AskPDF's AI features into your applications with our REST API.

Note: PDF operations (merge, compress, split, convert) run entirely client-side in the browser and are not available via API. The API provides access to AI-powered features: Chat and Summarize.

Authentication

All API requests require an API key passed in the Authorization header as a Bearer token. Get your API key from the API plan.

Authorization: Bearer YOUR_API_KEY

Endpoints

POST/api/chat

Chat with a PDF document using AI

{ "documentText": "...", "messages": [{"role": "user", "content": "..."}] }
POST/api/summarize

Generate an AI summary of a PDF

{ "documentText": "...", "length": "brief" | "standard" | "detailed" }

Code Examples

curl -X POST https://your-domain.com/api/chat \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "documentText": "Your extracted PDF text...",
    "messages": [
      {"role": "user", "content": "What is this document about?"}
    ]
  }'

Rate Limits

PlanRequests/minMonthly Limit
Free10150 requests
Pro60Unlimited
API12010,000 requests