ChargedAPI Documentation

Getting Started

ChargedAPI is a powerful document and image conversion API supporting 25+ formats, PDF tools, AI-powered features, and document generation.

Base URL

https://api.chargedapi.com

Authentication

Include your API key in the X-API-Key header:

curl -H "X-API-Key: your_api_key" https://api.chargedapi.com/usage

Credit System

1 credit
Standard conversions
2 credits
PDF tools, image tools
3 credits
AI features (redact, extract, remove-bg)

Check 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
}

Quick Start Examples

# 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 API

Convert documents, spreadsheets, presentations, and images between 25+ formats.

POST /convert?format={output_format} 1 credit

Convert a file to the specified output format

Supported Formats (25+)

Documents

pdf, docx, doc, rtf, odt, txt

Spreadsheets

xlsx, xls, ods, csv

Presentations

pptx, ppt, odp

Web & Data

html, xml, json, md

Images

png, jpg, jpeg, webp, gif, bmp, tiff

eBooks

epub

Examples

# 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"

Response

{
  "job_id": "abc123-def456-...",
  "status": "processing"
}

# Poll /status/{job_id} to get download URL when complete

PDF Tools

Manipulate PDF files: merge, split, compress, watermark, protect, and more.

POST /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
POST /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
POST /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
POST /pdf/watermark 2 credits

Add text watermark to PDF pages

textWatermark text (required)
positiondiagonal (default), center, top, bottom
opacity0.1-1.0 (default: 0.3)
colorgray (default), red, blue, green, black
font_sizeFont 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
POST /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
POST /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
POST /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
POST /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

Image Tools

Process images: resize, convert, compress, crop, rotate, and apply effects.

POST /image/resize

Resize image by dimensions or percentage

Params: width, height, 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"
POST /image/convert

Convert between image formats

Params: format (png/jpg/webp/gif/bmp), quality
curl -X POST "https://api.chargedapi.com/image/convert?format=webp&quality=85" \
  -H "X-API-Key: your_api_key" -F "file=@photo.jpg"
POST /image/compress

Compress image to reduce file size

Params: quality (1-100, default: 80)
curl -X POST "https://api.chargedapi.com/image/compress?quality=60" \
  -H "X-API-Key: your_api_key" -F "file=@large.jpg"
POST /image/crop

Crop image to specified dimensions

Params: width, height, x (default: 0), y (default: 0)
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"
POST /image/rotate

Rotate image by angle

Params: angle (90, 180, 270, -90)
curl -X POST "https://api.chargedapi.com/image/rotate?angle=90" \
  -H "X-API-Key: your_api_key" -F "file=@image.jpg"
POST /image/flip

Flip image horizontally or vertically

Params: direction (horizontal/vertical)
curl -X POST "https://api.chargedapi.com/image/flip?direction=horizontal" \
  -H "X-API-Key: your_api_key" -F "file=@image.jpg"
POST /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"
POST /image/blur

Apply gaussian blur effect

Params: radius (1-20, default: 5)
curl -X POST "https://api.chargedapi.com/image/blur?radius=10" \
  -H "X-API-Key: your_api_key" -F "file=@image.jpg"
POST /image/brightness

Adjust brightness and contrast

Params: brightness (0.1-2.0), contrast (0.1-2.0)
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"
POST /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"
POST /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"
POST /image/remove-bg 3 credits

AI-powered background removal

Params: format (png/jpg, default: png)
curl -X POST "https://api.chargedapi.com/image/remove-bg?format=png" \
  -H "X-API-Key: your_api_key" -F "file=@photo.jpg"

Document Generation

Generate documents from templates and manage PDF forms.

POST /generate/docx 2 credits

Generate DOCX/PDF from template with {{placeholders}}

templateDOCX file with {{placeholder}} syntax
dataJSON object with values
outputdocx (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
POST /generate/html-pdf 2 credits

Convert HTML template (with Jinja2 syntax) to PDF

templateHTML file with Jinja2 {{variables}}
dataJSON object with values
page_sizeA4 (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
POST /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"
  }
}
POST /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

Data Extraction

Extract structured data from documents. Returns JSON with parsed fields.

POST /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
}
POST /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"
POST /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"
POST /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": [...]
}
POST /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"

AI-Powered Tools

Advanced features using AI. Each costs 3 credits.

POST /ai/redact 3 credits

Automatically detect and redact sensitive information (PII)

Detects: Names, emails, phone numbers, SSN, addresses, credit cards, dates
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"
POST /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
POST /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

Reference

Job Status

GET /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://..."}
pending processing completed failed

Download Result

GET /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

Error Codes

CodeDescription
400Bad request / Invalid parameters / Unsupported format
401Invalid or missing API key
404Job not found
413File too large (max 50MB)
429Rate limit exceeded / Quota exceeded
500Server error

Rate Limits

PlanCredits/MonthRate LimitMax File
Free5010 req/min10 MB
Basic ($19)50030 req/min25 MB
Pro ($49)2,50060 req/min50 MB
Enterprise ($149)10,000120 req/min100 MB

SDKs & Examples

Python

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"]

JavaScript (Node.js)

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
  }
);