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.
Below are examples to help you quickly get started with the API. Explore our additional examples for more insights.
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.
https://api.pdfcrowd.com/convert/24.04/
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.
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
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.
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.
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.
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).
errfmt=txt, default)
Content-Type: text/plain
<status_code>.<reason_code> - <message>
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.
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. |
Refer to the Image to Image API Parameter Reference for a detailed description of all parameters.