Image to Image / HTTP API Documentation
Overview
The HTTP API provides direct access to PDFCrowd's conversion service without requiring library installation. Send an HTTP POST request to convert to image from any programming language or platform that supports HTTP requests.
Quick Start
Below are examples to help you quickly get started with the API. Explore our additional examples for more insights.
HTTP Request
All conversion API requests are sent as POST requests to the conversion endpoint. This section covers the technical details, including endpoint URLs, authentication methods, parameter format, and request structure.
Endpoint
https://api.pdfcrowd.com/convert/24.04/
Authentication
POST Parameters
Conversion settings and options are sent as parameters in the POST request body to configure the conversion. For a complete list of available parameters and their descriptions, see the Parameter Reference.
URL Parameters
The following optional parameter can be appended to the endpoint URL:
-
errfmt– Specifies the error response format (see HTTP Response)-
txt– Returns errors in plain text format (default) -
json– Returns errors in JSON format
-
Example:
https://api.pdfcrowd.com/convert/24.04/?errfmt=json
Request Format
The Content-Type header must match the request body format.
Most HTTP libraries and tools set this automatically based on how you structure your request.
-
multipart/form-data– Required when uploading local files -
application/x-www-form-urlencoded– May be used when no files are uploaded
Note: If you are using a standard HTTP client library or tool, the Content-Type is typically set automatically. You only need to set this manually when working with low-level HTTP libraries.
HTTP Response
The API returns different responses based on the conversion outcome. This section explains HTTP status codes, response body formats for both successful conversions and errors, and response headers containing conversion metadata.
Success Response
HTTP Status: 200 OK
The converted file is returned in the response body.
The Content-Type header is set to the appropriate MIME type for the output format.
Error Response
HTTP Status: 4xx (client error)
Error details are returned in the response body.
The format is controlled by the errfmt URL parameter
(see HTTP Request).
Text Format (errfmt=txt, default)
Content-Type: text/plain
<status_code>.<reason_code> - <message>
JSON Format (errfmt=json)
Content-Type: application/json
{
"status_code": <http_status_code>,
"reason_code": <specific_error_code>,
"message": "<error_message>"
}
For a complete list of status codes and reason codes, see API Status Codes.
Response Headers
The HTTP response includes the following headers with additional information about the conversion:
| Name | Description |
|---|---|
x-pdfcrowd-debug-log
|
URL pointing to the debug log for this request. |
x-pdfcrowd-remaining-credits
|
Number of conversion credits remaining in your account. |
x-pdfcrowd-consumed-credits
|
Number of credits consumed for this conversion. |
x-pdfcrowd-job-id
|
Unique identifier assigned to this conversion job. |
x-pdfcrowd-output-size
|
Size of the output data in bytes. |
x-pdfcrowd-reason-code
|
The error reason code, or 0 if no error. |
Troubleshooting
- If you are receiving an error, refer to the API Status Codes for more information.
- Use debug_log to obtain detailed information about the conversion process, including load errors, load times, browser console output, etc.
- Consult the FAQ for answers to common questions.
- Contact us if you need assistance or if there is a feature you are missing.
API Parameter Reference
Refer to the Image to Image API Parameter Reference for a detailed description of all parameters.