ChargedAPI is a powerful document and image conversion API supporting 25+ formats, PDF tools, AI-powered features, and document generation.
https://api.chargedapi.com
Include your API key in the X-API-Key header:
curl -H "X-API-Key: your_api_key" https://api.chargedapi.com/usage
curl -H "X-API-Key: your_api_key" https://api.chargedapi.com/usage
# Response
{
"plan": "pro",
"credits_used": 150,
"credits_limit": 2000,
"credits_remaining": 1850
}
# Convert DOCX to PDF
curl -X POST "https://api.chargedapi.com/convert?format=pdf" \
-H "X-API-Key: your_api_key" \
-F "file=@document.docx"
# Compress a PDF
curl -X POST "https://api.chargedapi.com/pdf/compress" \
-H "X-API-Key: your_api_key" \
-F "file=@large.pdf" --output compressed.pdf
# Remove image background
curl -X POST "https://api.chargedapi.com/image/remove-bg" \
-H "X-API-Key: your_api_key" \
-F "file=@photo.jpg" --output nobg.png
Convert documents, spreadsheets, presentations, and images between 25+ formats.
/convert?format={output_format}
1 credit
Convert a file to the specified output format
pdf, docx, doc, rtf, odt, txt
xlsx, xls, ods, csv
pptx, ppt, odp
html, xml, json, md
png, jpg, jpeg, webp, gif, bmp, tiff
epub
# DOCX to PDF
curl -X POST "https://api.chargedapi.com/convert?format=pdf" \
-H "X-API-Key: your_api_key" \
-F "file=@document.docx"
# Excel to CSV
curl -X POST "https://api.chargedapi.com/convert?format=csv" \
-H "X-API-Key: your_api_key" \
-F "file=@spreadsheet.xlsx"
# PowerPoint to PDF
curl -X POST "https://api.chargedapi.com/convert?format=pdf" \
-H "X-API-Key: your_api_key" \
-F "file=@presentation.pptx"
# HTML to PDF
curl -X POST "https://api.chargedapi.com/convert?format=pdf" \
-H "X-API-Key: your_api_key" \
-F "file=@page.html"
# Image to WebP
curl -X POST "https://api.chargedapi.com/convert?format=webp" \
-H "X-API-Key: your_api_key" \
-F "file=@photo.jpg"
{
"job_id": "abc123-def456-...",
"status": "processing"
}
# Poll /status/{job_id} to get download URL when complete
Manipulate PDF files: merge, split, compress, watermark, protect, and more.
/pdf/merge
2 credits
Merge multiple PDFs into one document
curl -X POST "https://api.chargedapi.com/pdf/merge" \
-H "X-API-Key: your_api_key" \
-F "files=@doc1.pdf" -F "files=@doc2.pdf" -F "files=@doc3.pdf" \
--output merged.pdf
/pdf/split
2 credits
Split PDF into separate pages (returns ZIP)
curl -X POST "https://api.chargedapi.com/pdf/split" \
-H "X-API-Key: your_api_key" \
-F "file=@document.pdf" --output pages.zip
/pdf/compress
2 credits
Compress PDF to reduce file size. Quality: low, medium (default), high, maximum
curl -X POST "https://api.chargedapi.com/pdf/compress?quality=medium" \
-H "X-API-Key: your_api_key" \
-F "file=@large.pdf" --output compressed.pdf
/pdf/watermark
2 credits
Add text watermark to PDF pages
| text | Watermark text (required) |
| position | diagonal (default), center, top, bottom |
| opacity | 0.1-1.0 (default: 0.3) |
| color | gray (default), red, blue, green, black |
| font_size | Font size in points (default: 48) |
curl -X POST "https://api.chargedapi.com/pdf/watermark?text=CONFIDENTIAL&position=diagonal&opacity=0.3&color=red" \
-H "X-API-Key: your_api_key" \
-F "file=@document.pdf" --output watermarked.pdf
/pdf/protect
2 credits
Password-protect a PDF
curl -X POST "https://api.chargedapi.com/pdf/protect?password=secret123" \
-H "X-API-Key: your_api_key" \
-F "file=@document.pdf" --output protected.pdf
/pdf/unlock
2 credits
Remove password from a protected PDF
curl -X POST "https://api.chargedapi.com/pdf/unlock?password=secret123" \
-H "X-API-Key: your_api_key" \
-F "file=@protected.pdf" --output unlocked.pdf
/pdf/rotate
2 credits
Rotate PDF pages. Angle: 90, 180, 270
curl -X POST "https://api.chargedapi.com/pdf/rotate?angle=90" \
-H "X-API-Key: your_api_key" \
-F "file=@document.pdf" --output rotated.pdf
/pdf/ocr
3 credits (AI)
OCR scanned PDFs to make text searchable/selectable
curl -X POST "https://api.chargedapi.com/pdf/ocr" \
-H "X-API-Key: your_api_key" \
-F "file=@scanned.pdf" --output searchable.pdf
Process images: resize, convert, compress, crop, rotate, and apply effects.
/image/resize
Resize image by dimensions or percentage
curl -X POST "https://api.chargedapi.com/image/resize?width=800&height=600" \
-H "X-API-Key: your_api_key" -F "file=@image.jpg"
/image/convert
Convert between image formats
curl -X POST "https://api.chargedapi.com/image/convert?format=webp&quality=85" \
-H "X-API-Key: your_api_key" -F "file=@photo.jpg"
/image/compress
Compress image to reduce file size
curl -X POST "https://api.chargedapi.com/image/compress?quality=60" \
-H "X-API-Key: your_api_key" -F "file=@large.jpg"
/image/crop
Crop image to specified dimensions
curl -X POST "https://api.chargedapi.com/image/crop?width=400&height=400&x=100&y=50" \
-H "X-API-Key: your_api_key" -F "file=@image.jpg"
/image/rotate
Rotate image by angle
curl -X POST "https://api.chargedapi.com/image/rotate?angle=90" \
-H "X-API-Key: your_api_key" -F "file=@image.jpg"
/image/flip
Flip image horizontally or vertically
curl -X POST "https://api.chargedapi.com/image/flip?direction=horizontal" \
-H "X-API-Key: your_api_key" -F "file=@image.jpg"
/image/grayscale
Convert image to black and white
curl -X POST "https://api.chargedapi.com/image/grayscale" \
-H "X-API-Key: your_api_key" -F "file=@image.jpg"
/image/blur
Apply gaussian blur effect
curl -X POST "https://api.chargedapi.com/image/blur?radius=10" \
-H "X-API-Key: your_api_key" -F "file=@image.jpg"
/image/brightness
Adjust brightness and contrast
curl -X POST "https://api.chargedapi.com/image/brightness?brightness=1.3&contrast=1.2" \
-H "X-API-Key: your_api_key" -F "file=@image.jpg"
/image/invert
Invert colors (negative effect)
curl -X POST "https://api.chargedapi.com/image/invert" \
-H "X-API-Key: your_api_key" -F "file=@image.jpg"
/image/sepia
Apply vintage sepia tone effect
curl -X POST "https://api.chargedapi.com/image/sepia" \
-H "X-API-Key: your_api_key" -F "file=@image.jpg"
/image/remove-bg
3 credits
AI-powered background removal
curl -X POST "https://api.chargedapi.com/image/remove-bg?format=png" \
-H "X-API-Key: your_api_key" -F "file=@photo.jpg"
Generate documents from templates and manage PDF forms.
/generate/docx
2 credits
Generate DOCX/PDF from template with {{placeholders}}
| template | DOCX file with {{placeholder}} syntax |
| data | JSON object with values |
| output | docx (default) or pdf |
# Template contains: Hello {{name}}, your invoice #{{invoice_number}}...
curl -X POST "https://api.chargedapi.com/generate/docx?output=pdf" \
-H "X-API-Key: your_api_key" \
-F "template=@template.docx" \
-F 'data={"name": "John Smith", "invoice_number": "INV-001", "date": "2024-01-15", "total": "$500.00"}' \
--output generated.pdf
/generate/html-pdf
2 credits
Convert HTML template (with Jinja2 syntax) to PDF
| template | HTML file with Jinja2 {{variables}} |
| data | JSON object with values |
| page_size | A4 (default), Letter, Legal |
curl -X POST "https://api.chargedapi.com/generate/html-pdf?page_size=A4" \
-H "X-API-Key: your_api_key" \
-F "template=@report.html" \
-F 'data={"title": "Sales Report", "items": [{"name": "Widget", "qty": 10}]}' \
--output report.pdf
/generate/export-form
2 credits
Extract form field data from fillable PDFs as JSON
curl -X POST "https://api.chargedapi.com/generate/export-form" \
-H "X-API-Key: your_api_key" \
-F "file=@filled_form.pdf"
# Response
{
"fields": {
"first_name": "John",
"last_name": "Smith",
"email": "john@example.com",
"date": "2024-01-15"
}
}
/generate/import-form
2 credits
Fill PDF form fields with JSON data
curl -X POST "https://api.chargedapi.com/generate/import-form" \
-H "X-API-Key: your_api_key" \
-F "file=@blank_form.pdf" \
-F 'data={"first_name": "John", "last_name": "Smith", "email": "john@example.com"}' \
--output filled_form.pdf
Extract structured data from documents. Returns JSON with parsed fields.
/extract/invoice
3 credits
Extract invoice data: vendor, invoice number, date, line items, totals, tax
curl -X POST "https://api.chargedapi.com/extract/invoice" \
-H "X-API-Key: your_api_key" \
-F "file=@invoice.pdf"
# Response
{
"vendor": "Acme Corp",
"invoice_number": "INV-2024-001",
"date": "2024-01-15",
"items": [
{"description": "Widget A", "quantity": 10, "unit_price": 25.00, "total": 250.00}
],
"subtotal": 250.00,
"tax": 20.00,
"total": 270.00
}
/extract/receipt
3 credits
Extract receipt data: merchant, date, items, total, payment method
curl -X POST "https://api.chargedapi.com/extract/receipt" \
-H "X-API-Key: your_api_key" \
-F "file=@receipt.jpg"
/extract/contract
3 credits
Extract contract data: parties, effective date, terms, obligations
curl -X POST "https://api.chargedapi.com/extract/contract" \
-H "X-API-Key: your_api_key" \
-F "file=@contract.pdf"
/extract/resume
3 credits
Extract resume data: name, contact info, skills, experience, education
curl -X POST "https://api.chargedapi.com/extract/resume" \
-H "X-API-Key: your_api_key" \
-F "file=@resume.pdf"
# Response
{
"name": "John Smith",
"email": "john@example.com",
"phone": "+1-555-123-4567",
"skills": ["Python", "JavaScript", "SQL"],
"experience": [...],
"education": [...]
}
/extract/table
2 credits
Extract tables from documents as JSON arrays
curl -X POST "https://api.chargedapi.com/extract/table" \
-H "X-API-Key: your_api_key" \
-F "file=@document.pdf"
Advanced features using AI. Each costs 3 credits.
/ai/redact
3 credits
Automatically detect and redact sensitive information (PII)
curl -X POST "https://api.chargedapi.com/ai/redact" \
-H "X-API-Key: your_api_key" \
-F "file=@document.pdf" --output redacted.pdf
# Optional: specify what to redact
curl -X POST "https://api.chargedapi.com/ai/redact?types=email,phone,ssn" \
-H "X-API-Key: your_api_key" \
-F "file=@document.pdf"
/image/remove-bg
3 credits
AI-powered background removal from images
curl -X POST "https://api.chargedapi.com/image/remove-bg?format=png" \
-H "X-API-Key: your_api_key" \
-F "file=@photo.jpg" --output nobg.png
/pdf/ocr
3 credits
OCR scanned PDFs to make text searchable and selectable
curl -X POST "https://api.chargedapi.com/pdf/ocr" \
-H "X-API-Key: your_api_key" \
-F "file=@scanned.pdf" --output searchable.pdf
/status/{job_id}
Check job status and get download URL when complete
curl -H "X-API-Key: your_api_key" \
"https://api.chargedapi.com/status/abc123-def456"
# Response (processing)
{"job_id": "abc123-def456", "status": "processing"}
# Response (completed)
{"job_id": "abc123-def456", "status": "completed", "download_url": "https://..."}
/download/{job_id}
Download the converted/processed file
curl -H "X-API-Key: your_api_key" \
"https://api.chargedapi.com/download/abc123-def456" \
--output result.pdf
| Code | Description |
|---|---|
| 400 | Bad request / Invalid parameters / Unsupported format |
| 401 | Invalid or missing API key |
| 404 | Job not found |
| 413 | File too large (max 50MB) |
| 429 | Rate limit exceeded / Quota exceeded |
| 500 | Server error |
| Plan | Credits/Month | Rate Limit | Max File |
|---|---|---|---|
| Free | 50 | 10 req/min | 10 MB |
| Basic ($19) | 500 | 30 req/min | 25 MB |
| Pro ($49) | 2,500 | 60 req/min | 50 MB |
| Enterprise ($149) | 10,000 | 120 req/min | 100 MB |
import requests
response = requests.post(
"https://api.chargedapi.com/convert?format=pdf",
headers={"X-API-Key": "your_api_key"},
files={"file": open("doc.docx", "rb")}
)
job_id = response.json()["job_id"]
const form = new FormData();
form.append('file', fs.createReadStream('doc.docx'));
const res = await fetch(
'https://api.chargedapi.com/convert?format=pdf',
{
method: 'POST',
headers: {'X-API-Key': 'your_api_key'},
body: form
}
);