Overview/API Reference

API Reference

Complete reference for the PDF.beauty REST API endpoints.

Base URL

https://api.pdf.beauty

Authentication

All API requests require a valid API key. Include it in the Authorization header:

Header
Authorization: pk_xxxxxxxxxxxxx

Endpoints

POST/api/convert/submit

Submit a PDF file for conversion to PPTX

Parameters

fileFilerequiredThe PDF file to convert
maxPagesnumberMaximum pages to convert (optional)

Response

JSON
{
  "taskId": "task_abc123xyz",
  "status": "pending",
  "message": "Task created successfully"
}
GET/api/convert/tasks/{taskId}

Get the status of a conversion task

Parameters

taskIdstringrequiredThe task ID returned from /api/convert/submit

Response

JSON
{
  "taskId": "task_abc123xyz",
  "status": "completed",
  "progress": 100,
  "currentStep": "Finished",
  "resultUrl": "/api/convert/tasks/task_abc123xyz/download",
  "totalPages": 10,
  "pagesToConvert": 10,
  "pagesConverted": 10,
  "creditsUsed": 10
}
GET/api/convert/tasks/{taskId}/download

Download the converted PPTX file

Parameters

taskIdstringrequiredThe task ID of a completed conversion
GET/api/convert/tasks

Get paginated list of user's conversion tasks

Parameters

pagenumberPage number (default: 1)
pageSizenumberItems per page (default: 20)

Response

JSON
{
  "tasks": [...],
  "page": 1,
  "pageSize": 20,
  "total": 100
}
GET/api/convert/credits

Get user's credit information

Response

JSON
{
  "userId": "user_123",
  "credits": 100,
  "lockedCredits": 0,
  "plan": "FREE",
  "freePagesRemaining": 3
}

Error Codes

CodeDescription
400Bad Request - Invalid parameters
401Unauthorized - Invalid or missing API key
402Payment Required - Insufficient credits
404Not Found - Task or resource not found
429Too Many Requests - Rate limit exceeded
500Internal Server Error