Skip to main content

API Documentation

Integrate PDF to eBook conversion into your application

OpenAPI

API Requests

All requests require an API key in the Authorization header (format: Bearer YOUR_API_KEY)

https://api.pdfcraft.ai/v1/pcc-api
Authorization: Bearer YOUR_API_KEY

POST /transforms

{
  "input_format": "pdf"
}
{
  "uuid": "8ae07e41-6e94-4144-9562-5af4116cba7e",
  "status": "waiting_for_upload",
  "input_format": "pdf",
  "created_at": "2026-10-21T08:00:00.000Z",
  "updated_at": "2026-10-21T08:00:00.000Z"
}

GET /transforms/{uuid}/upload-urls

POST /transforms/{uuid}/launch

{
  "output_format": "epub",
  "target_language": "zh-CN",
  "rendering_mode": "bilingual",
  "footnotes": "disabled"
}

GET /transforms/{uuid}

GET /transforms/{uuid}/observation

{
  "status": "running",
  "progress": {
    "queued": false,
    "stage": "extracting",
    "completed_pages": 12,
    "total_pages": 50
  },
  "preview": {
    "cursor": "opaque"
  }
}

GET /transforms/{uuid}/download-urls

{
  "get_url": "https://storage.example/result.epub?signed",
  "head_url": "https://storage.example/result.epub?signed-head"
}

GET /transforms/running/

GET /transforms/finished/

cURL

BASE=https://api.pdfcraft.ai/v1/pcc-api
# 1. Create a resource; save the returned uuid.
curl "$BASE/transforms" -H "Authorization: Bearer $PDF_CRAFT_API_KEY" \
  -H 'Content-Type: application/json' -d '{"input_format":"pdf"}'
# 2. Obtain upload URLs. PUT a local PDF to put_url using the returned headers.
curl "$BASE/transforms/$TASK_UUID/upload-urls" -H "Authorization: Bearer $PDF_CRAFT_API_KEY"
curl -X PUT "$PUT_URL" -H 'Content-Type: application/pdf' \
  -H 'x-oss-forbid-overwrite: true' --data-binary @document.pdf
# 3. Launch. A repeated launch must use identical parameters.
curl "$BASE/transforms/$TASK_UUID/launch" -H "Authorization: Bearer $PDF_CRAFT_API_KEY" \
  -H 'Content-Type: application/json' -d '{"output_format":"epub"}'
# 4. Read basic status. Poll with backoff while running.
curl "$BASE/transforms/$TASK_UUID" -H "Authorization: Bearer $PDF_CRAFT_API_KEY"
# 5. Only after succeeded, request a fresh download signature.
curl "$BASE/transforms/$TASK_UUID/download-urls" -H "Authorization: Bearer $PDF_CRAFT_API_KEY"
# Never attach the API credential to signed storage URLs.
Python quickstart