API Documentation
Integrate DocVerse PDF tools into your application with our RESTful API
Getting Started
To use the DocVerse API, you'll need an API key. Sign up for a Pro or Business plan to get your API key.
Base URL:
http://localhost:5000Authentication:
Authorization: Bearer YOUR_API_KEYAPI Endpoints
/api/tools/mergeMerge multiple PDF files into one
Parameters: files: File[] (multipart/form-data)
Response: PDF file (merged.pdf)
/api/tools/splitSplit PDF into individual pages
Parameters: file: File, pages: string (e.g., "1-3,5")
Response: PDF file (split.pdf)
/api/tools/compressCompress PDF file size
Parameters: file: File
Response: PDF file (compressed.pdf)
/api/tools/pdf-to-wordConvert PDF to Word document
Parameters: file: File
Response: DOCX file (converted.docx)
/api/tools/pdf-to-imageConvert PDF pages to images
Parameters: file: File, format: string (jpg|png)
Response: Image files (ZIP)
/api/tools/image-to-pdfConvert images to PDF
Parameters: files: File[] (multipart/form-data)
Response: PDF file (images.pdf)
/api/tools/rotateRotate PDF pages
Parameters: file: File, angle: number (90|180|270)
Response: PDF file (rotated.pdf)
/api/tools/protectAdd password protection to PDF
Parameters: file: File, password: string
Response: PDF file (protected.pdf)
/api/tools/unlockRemove password from PDF
Parameters: file: File, password: string
Response: PDF file (unlocked.pdf)
/api/tools/ai-translateTranslate PDF to another language
Parameters: file: File, targetLang: string (es|fr|de|zh|etc)
Response: PDF file (translated.pdf)
/api/tools/ai-summarizeGenerate AI summary of PDF
Parameters: file: File
Response: JSON {summary, originalLength, summaryLength, compression}
Example Request
// Merge PDFs example
const formData = new FormData();
formData.append('files', file1);
formData.append('files', file2);
const response = await fetch('http://localhost:5000/api/tools/merge', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
},
body: formData
});
const blob = await response.blob();
// Download the merged PDF