PDF API Usage Guide

Welcome to the PDF API! This page explains how to use the API to convert, upload, and manage PDF files. All endpoints are RESTful and return JSON responses.

Authentication

Endpoints

1. Convert HTML to PDF

POST /api/conversions
  Content-Type: application/json
  Authorization: Bearer YOUR_API_KEY

  {
    "html": "<h1>Hello PDF!</h1>"
  }

Send a JSON POST request with an html key containing your HTML string.

The response will be JSON:

{
    "file": "https://yourdomain.com/path/to/file.pdf",
    "byte_size": 123456
  }

The file is a URL to the generated PDF, and byte_size is the file size in bytes.

Example: cURL Request

curl -X POST \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"html": "

Hello PDF!

"}' \ https://yourdomain.com/api/conversions

Support

For help, contact support@yourdomain.com.