API Documentation

conv2pdf REST API — convert, merge, split, compress and protect PDFs from your application. EU hosting, GDPR-strict, no US tier in the processing chain.

Quick start

  1. Create an account (free, email — no password required)
  2. From your dashboard, create an API key (free Dev plan, 100 conversions/mo to get started)
  3. Authenticate your calls with the Authorization: Bearer cpdf_live_… header

Base URL

https://api.conv2pdf.com/v1

Authentication

Every request must include the HTTP header Authorization: Bearer <your_key>. A revoked or non-existent key returns a 401 status. An exceeded quota returns 429 with reset details.

Endpoints

GET /v1/tools

Returns the list of available tools, their limits and accepted formats.

curl https://api.conv2pdf.com/v1/tools \
  -H "Authorization: Bearer cpdf_live_xxx"

POST /v1/convert/:tool

Performs a conversion. Files are sent as multipart/form-data.

Available tools: image-to-pdf, office-to-pdf, merge-pdf, split-pdf, compress-pdf, protect-pdf.

Optional parameters (form-data fields):

Example — Image → PDF (curl)

curl -X POST https://api.conv2pdf.com/v1/convert/image-to-pdf \
  -H "Authorization: Bearer cpdf_live_xxx" \
  -F "file=@photo.jpg"

Example — Merge PDFs (curl)

curl -X POST https://api.conv2pdf.com/v1/convert/merge-pdf \
  -H "Authorization: Bearer cpdf_live_xxx" \
  -F "file=@doc1.pdf" \
  -F "file=@doc2.pdf" \
  -F "file=@doc3.pdf"

Example — Compression (curl)

curl -X POST https://api.conv2pdf.com/v1/convert/compress-pdf \
  -H "Authorization: Bearer cpdf_live_xxx" \
  -F "file=@big.pdf" \
  -F "quality=medium"

Example — Password protection (curl)

curl -X POST https://api.conv2pdf.com/v1/convert/protect-pdf \
  -H "Authorization: Bearer cpdf_live_xxx" \
  -F "file=@confidential.pdf" \
  -F "password=secret123" \
  -F "prevent_print=on" \
  -F "prevent_copy=on"

AES-256 encryption. The resulting PDF will prompt for the password on opening and apply the selected restrictions.

Successful response

{
  "job_id": "abc123…",
  "status": "success",
  "download_url": "/v1/download/abc123…",
  "size_bytes": 124533,
  "quota": {
    "plan": "starter",
    "monthly_quota": 500,
    "used": 42,
    "period_end": 1715789012345
  }
}

GET /v1/download/:jobId

Downloads the converted file. The PDF is served with Content-Type: application/pdf and Cache-Control: no-store. Available for 1 hour after conversion.

curl https://api.conv2pdf.com/v1/download/abc123… \
  -H "Authorization: Bearer cpdf_live_xxx" \
  -o output.pdf

Examples — Node.js

import { readFile } from 'node:fs/promises';

const file = await readFile('./photo.jpg');
const formData = new FormData();
formData.append('file', new Blob([file]), 'photo.jpg');

const res = await fetch('https://api.conv2pdf.com/v1/convert/image-to-pdf', {
  method: 'POST',
  headers: { 'Authorization': 'Bearer cpdf_live_xxx' },
  body: formData
});
const data = await res.json();
console.log(data.download_url);

Examples — Python

import requests

with open('photo.jpg', 'rb') as f:
    r = requests.post(
        'https://api.conv2pdf.com/v1/convert/image-to-pdf',
        headers={'Authorization': 'Bearer cpdf_live_xxx'},
        files={'file': f}
    )
print(r.json()['download_url'])

Error codes

CodeErrorCause
400not_enough_files / too_many_filesFile count outside tool bounds
401missing_bearer_token / invalid_api_keyMissing auth or invalid key
403forbiddenJob belongs to another key
404tool_not_found / job_not_foundTool or job does not exist
409job_not_readyConversion not complete
410file_expiredFile deleted (1 h TTL exceeded)
413file_too_largeFile > 200 MB (API limit)
415unsupported_formatExtension not accepted by tool
429quota_exceededMonthly quota reached
500failedServer conversion error (details in error field)

Quotas and reset

Each API key has a monthly quota according to its plan (see pricing). The period is rolling 30 days from the key creation date. At the end of each period, used_current_period is automatically reset to zero.

Privacy

No file (input or output) is kept beyond 1 hour. No result caching is applied. All processing happens on EU servers (OVH Gravelines). See our privacy policy for details.

Support

For any technical question, use our contact form (subject "Technical question"). Business and Enterprise plans: priority support with contractual SLA.