API Documentation
Complete reference for the SemPDF REST API. All endpoints require authentication via Bearer token.
Base URL
https://sempdf.com/api/v1Authentication
All requests require an API key passed in the Authorization header:
Authorization: Bearer spdf_your_api_key_hereGet your API key at sempdf.com/developers
Rate Limits & Credits
Each API call consumes credits based on the endpoint. Credits reset monthly. Response headers include:
X-Credits-UsedCredits consumed by this request
X-Credits-RemainingCredits remaining in your plan
Endpoints
Convert a PDF file to an editable Word document (DOCX).
Request
Content-Type: multipart/form-data
| Parameter | Type | Required | Description |
|---|---|---|---|
| file | File | Yes | PDF file to convert |
Response
Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document
DOCX file binary
Content-Disposition: attachment; filename="output.docx"X-Credits-Used: 5X-Credits-Remaining: 1995curl -X POST https://sempdf.com/api/v1/pdf-to-word \ -H "Authorization: Bearer YOUR_API_KEY" \ -F "file=@document.pdf" \ -o output.docx
Error Codes
| Code | Description |
|---|---|
| 400 | Bad Request — missing or invalid parameters |
| 401 | Unauthorized — invalid or missing API key |
| 403 | Forbidden — no active API plan |
| 429 | Too Many Requests — insufficient credits or rate limit exceeded |
| 500 | Internal Server Error — something went wrong on our end |
| 502 | Bad Gateway — conversion service temporarily unavailable |
Error Response Format
{
"error": "Description of the error",
"credits_remaining": 0, // only on 429
"credits_required": 5, // only on 429
"upgrade_url": "https://..." // only on 429
}