Skip to content
pdfconversionapi

Errors

An error is a status code with a JSON message in almost every case. Retry 429 and 503 after the wait in Retry-After, retry dropped connections, retry a 500 once, and change the request for the rest.

Contents (7 sections)

When a request fails, the status is 4xx or 5xx and the body is JSON with two fields:

Output
{"Code":422,"Message":"the input file is password-protected"}

Code repeats the HTTP status. Message is written for a person: it names the parameter, the limit or the reason. Branch your code on the status code, and log the message. Message texts can change between releases, so don't match on them.

Status codes

StatusMeaningWhat to do
400No file, a bad parameter value, or an option this conversion doesn't support yet. The message names the parameter.Fix the request; retrying won't help.
401Missing or unknown API key, or one that was replaced, deleted or disabled.Send Authorization: Bearer <key>. Keys in URLs are refused.
403The key's plan isn't set up on our side.Write to support.
404We don't convert between those two formats, or a download link has expired.Check /v2/info for the conversions we offer.
413A request over your plan's upload limit (10 MB on the Free plan or 100 MB on paid plans; all files and fields together), or a result past a limit (512 MB output, 100 megapixel images, 2,000 pages).Split the input or lower the resolution.
422The file can't be read as the format in the URL, is password-protected, or is a restricted or signed PDF this conversion would rewrite. The message says which.Check the file and the format; remove the password or restrictions first.
429More than 600 requests in a minute from one account; all the conversions your plan runs at once are busy; or, on a plan without overage such as Free, this month's conversions are used up. The message says which.Wait for the Retry-After seconds, then retry. For the monthly limit that is the start of next month (UTC); GET /v2/usage shows where you stand.
500The converter failed on this file for a reason on our side.Retry once; if it fails again, send us the x-request-id header.
503Every conversion slot is busy, or we paused your plan's conversions for a while to stop abuse.Retry after the Retry-After seconds, with backoff.
504The conversion ran past 120 seconds.Split large files, or ask us about longer limits.

Three different limits answer 429, and the message says which one you reached: your account's rate limit, your plan's conversions at once, or your plan's conversions for the month. Each one sets Retry-After, and the waits are very different, so read it before you retry (Retry-After).

A 503 usually means our servers are busy for a moment. It can also mean that conversions on your plan are paused for a while; the message says so.

A 403 means the key's plan isn't set up on our side. Write to support@pdfconversionapi.com if you get one.

A 422 also covers a file we could read but won't convert as asked: a PDF whose owner restricted what readers may do, sent without its owner password, or a digitally signed PDF that the conversion would rewrite. The messages below say which.

A 500 means the failure is on our side: either our gateway or a conversion container hit an unexpected error (internal error), or an engine failed on the file in a way we didn't anticipate (the conversion failed: ..., followed by the reason).

Messages you'll see

These are the messages behind the most common errors. Names, numbers and formats in them come from your request; a part in italics is a reason that varies.

StatusMessageWhat happened
400no input file was providedThe request had no File field.
400this conversion takes exactly one fileMore than one file was sent to a conversion that takes one.
400PageRange is not supported yet for DOCX → PDFA documented option was set to a value this conversion can't apply. Sent at its default value, the option is accepted. A PDF tool is named by its path, as in AutoRotate is not supported yet for pdf/to/rotate. file/to/zip refuses Password this way, with one file or several (Password is not supported yet for file/to/zip), because it doesn't encrypt archives yet.
400PageRange can't be combined with the open password yet for PDF → HTML; send the owner password in Password, or remove the protection with /v2/convert/pdf/to/unprotect firstPDF to DOCX, PPTX, HTML, RTF and Markdown got PageRange and the password that opens a PDF with restrictions. The PDF watermark, crop, image extraction and OCR tools answer the same way and name their path, for example PageRange can't be combined with the open password yet for pdf/to/text-watermark; .... With the owner password in Password, PageRange works. It also works with the open password of a PDF that restricts nothing, such as one made by pdf/to/protect with AllowEverything=true.
400password-protected ZIP archives can't be opened yetzip/to/extract got an archive with encrypted files, and a Password. We can't decrypt ZIP archives yet. Without Password, the same archive gets 422 the input file is password-protected.
400this data cannot be a code128 barcode: Contents length should be between 1 and 80 characters, but got 100data/to/barcode got Data that the barcode type can't hold. The part after the colon says why. Too much data for a Data Matrix code gets this data is too long for a datamatrix barcode.
400PageRange asks for page 7, but the document has 6 pagesA page in PageRange, or the first page of a range, is past the end of the document. The end of a range may be past it: 4-10 on a 6-page file gives pages 4 to 6. See Requests.
400PageRange '3-1' is not valid (example: 1-3,5)The range isn't written in a form we read. The message quotes it.
400'teal' is not a color (use white, black, red, green, blue, gray, #RRGGBB or R,G,B)A color parameter, such as FontColor or BackgroundColor, has a value we don't read.
400parameter names must be letters, digits or _A field name has another character, or is longer than 64 characters.
400invalid format in the URLA format in the path has a character other than letters, digits and -, or is longer than 20 characters.
401a valid API key is required (Authorization: Bearer <key>)The key is missing or unknown, or it was replaced or its account deleted. See Authentication.
403this key's plan is not set up; write to supportThe key's plan isn't set up on our side. Write to support@pdfconversionapi.com.
404conversion from docx to dwg is not supportedWe don't convert between these two formats.
404not foundThe path doesn't exist, or a stored file's link has expired or the file was deleted.
413the Free plan accepts uploads up to 10 MB, all files togetherOn the Free plan, the request, all files and fields together, is over the plan's limit. See Limits.
413uploads are limited to 100 MBOn a paid plan, the request is over the limit.
413the image is 10,001×10,001 pixels, above the limit of 100,000,000 pixelsAn image, or a page rendered to an image, is past a limit. When the size comes from the ImageWidth or ImageHeight you sent, the message ends with ; lower ImageWidth or ImageHeight. Other 413 messages also say which limit was reached.
413page 3 is too large to draw at 16,666×8,333 pixels; lower ImageResolutionA page rendered to an image would be more than 16,000 pixels wide or tall. When ImageWidth or ImageHeight set the size, the message ends with ; lower ImageWidth or ImageHeight instead. pdf/to/rasterize names its own option: page 1 is too large to draw at 16,666×16,666 pixels; lower Resolution. See Limits.
413WebP images can be at most 16,384 pixels on a side, and this one is 20,000×1,000; lower ImageWidth or ImageHeightThe image to be written is larger than its output format allows: 16,384 pixels a side for WebP, 65,500 for JPEG, 65,535 for GIF and TGA. The message names the format and the size. It ends with ; lower ImageWidth or ImageHeight only when you sent one of them and the conversion applies it. See Limits.
413this page needs the browser engine and is too large to resendAn HTML page that needs the browser engine came in a request over 25 MB. See Limits.
422the input file could not be read: reasonThe file isn't valid in the format named in the URL. The reason follows the colon, for example it is not a PNG image for a file sent to a PNG conversion that isn't a PNG, it is not a ZIP archive for a file sent to zip/to/extract that isn't one, or the image is cut short: its data ends before its last pixel for an image whose data stops early.
422the input file could not be read: this is not an Outlook messageA file sent to an MSG conversion isn't an Outlook message, for example an older Word or Excel file. A broken message gets the Outlook message is damaged after the colon instead, and one saved with 4096-byte sectors, which we can't read yet, says so.
422image 3 (scan.png) could not be read: reasonOne of the files sent to images/to/pdf isn't an image we can read. The message gives its position and name.
422the input file is password-protectedThe file needs a password to open, and the request had none or the wrong one. Send it in Password. A PDF that opens without a password never gets this answer: the PDF tools set aside a Password that isn't the owner password and answer as if none was sent, with the message about the PDF's restrictions if it has any. pdf/to/meta then describes the file with opened_as_owner set to false. A protected PDF or Illustrator (.ai) file opens with it, and pdf/to/merge opens every protected file it gets with that one Password. A protected DOCX, XLSX or PPTX opens with it in conversions that take one file. A protected DOC, XLS, PPT or OpenDocument file opens only in some conversions, such as XLS to PDF; the others answer 400, for example password-protected DOC files can't be converted to PDF yet, and need the password removed first.
422file 2 (locked.pdf) is password-protected; send its password in PasswordOne of the files sent to pdf/to/merge needs a password to open, and the request had none. The message gives its position and name. When Password doesn't open it, the message ends is password-protected, and Password does not open it. A problem with one file is named the same way, with the message about it after the colon, for example file 1 (a.pdf): this PDF has permission restrictions; ..., or file 1 (a.pdf) could not be read: and the reason.
422this PDF has permission restrictions; send the owner password in Password, or remove them with /v2/convert/pdf/to/unprotect and the owner passwordThe PDF's owner restricted what readers may do, such as printing or editing. pdf/to/merge, split, extract, delete-pages, rotate, resize and rasterize write a new PDF that wouldn't keep those restrictions, so they refuse the file. Send the owner password in Password and they lift the restrictions and convert it; a wrong password, or the password that only opens the file, leaves them in place. Allowing changes to the content counts as allowing page assembly too, so a PDF made by pdf/to/protect with AllowEverything=true is accepted. Rendering its pages to images still works.
422this PDF is digitally signed, and rewriting it would invalidate the signatureThe same tools refuse a signed PDF, because any change to the file breaks the signature.
422this PDF's permissions don't allow copying its text; send the owner password in Password, or remove the restrictions with /v2/convert/pdf/to/unprotect and the owner passwordpdf/to/txt refuses a PDF whose owner doesn't allow copying text, unless you send the owner password in Password.
422this PDF's permissions don't allow copying text and images; send the owner password in Password, or remove the restrictions with /v2/convert/pdf/to/unprotect and the owner passwordPDF to DOCX, PPTX, HTML, RTF and Markdown, and pdf/to/extract-images, refuse a PDF whose owner doesn't allow copying, with or without PageRange. The owner password in Password lifts the restriction; a wrong password gets the same 422.
422this PDF's permissions don't allow page changes; send the owner password in Password, or remove the restrictions with /v2/convert/pdf/to/unprotect and the owner passwordpdf/to/crop refuses a PDF whose owner doesn't allow page changes, without the owner password or with a wrong one. The watermark tools and pdf/to/flatten answer the same way when changes to the document aren't allowed: this PDF's permissions don't allow changes to the document; ....
422this PDF's permissions don't allow changing security; send the owner password in Password, or remove the restrictions with /v2/convert/pdf/to/unprotect and the owner passwordpdf/to/protect got a PDF with restrictions, without its owner password, with a wrong one, or with the password that only opens it. With the owner password, or the open password of a PDF that restricts nothing, it protects the opened copy with the passwords you send. A PDF that has only an owner password and restricts nothing needs no Password.
422removing this PDF's protection needs the owner password; send the owner password in Passwordpdf/to/unprotect got a PDF with restrictions, without its owner password, with a wrong one, or with the password that only opens it. A PDF made by pdf/to/protect with AllowEverything=true restricts nothing, so its open password is enough, and if it has only an owner password it comes back unencrypted with no Password at all.
422this PDF isn't protected: it has no password or restriction to removepdf/to/unprotect got a PDF that has neither a password nor restrictions, so there is nothing to remove. Use the file as it is.
422the PDF could not be made PDF/A compliant: issuespdf/to/pdfa converted the file, but the result still broke PDF/A rules, so we didn't return it.
429too many requests; slow downMore than 600 requests in 60 seconds from your account, conversions and GET /v2/usage together.
429the Free plan runs 1 conversion at a time; wait for the one running to finishYour account already runs as many conversions as your plan allows. See Limits.
429this month's 250 conversions on the Free plan are used up; the count starts again on 2026-12-01 (UTC)The plan's conversions for this calendar month are used up. Only the Free plan stops here; paid plans keep converting. See Limits.
503the server is busy; retry shortlyNo conversion slot came free within 20 seconds. For requests up to 25 MB, our gateway had already tried twice more.
503conversions on the Free plan are paused for a while; try again laterWe paused conversions on the plan for a while, a switch we use against abuse.
504the conversion timed outThe conversion ran past 120 seconds.

Responses that aren't JSON

A few error responses don't have our JSON body, so don't assume every body parses. When one doesn't, fall back to the status code and the Content-Type:

  • A 413 from the edge network. Our cloud provider's network sits in front of our API and has its own limit on request size. A request close to 100 MB can be refused there before it reaches us. That 413 is an HTML page from the provider, and it has no x-request-id header. Handle it like any other 413: send less data in one request.
  • A 400 for a body that isn't a multipart form. A JSON body, a urlencoded body, or a form without a boundary gets a 400 with the plain-text body Invalid `boundary` for `multipart/form-data` request. See Requests.
  • A 504 with an empty body. A container that hasn't answered after 170 seconds (Limits) gives up without writing a body. The Content-Type still says application/json, so a JSON parser fails on it.
  • The edge network's own error pages. If our gateway fails before it can answer, our cloud provider sends an HTML error page with a 5xx status. Like the edge 413, it has no x-request-id.

The retry examples below read error bodies this way.

Which errors to retry

StatusRetry?How
429Yes, when the wait is shortWait at least the Retry-After seconds, then retry: 10 for the rate limit, 5 for conversions at once. When the month's conversions are used up, Retry-After runs to the first day of next month (UTC); stop sending conversions until then.
503YesWait at least the Retry-After seconds, then retry with backoff and jitter: 5 when the servers are busy, 600 when conversions on your plan are paused.
500OnceRetry once after a few seconds. If it fails again, the file is the likely cause; write to us with the x-request-id.
504NoThe same file with the same options will most likely run out of time again. Split the file, lower ImageResolution, or ask us about it.
No response (connection refused or reset)YesRetry with backoff and jitter.
400, 401, 403, 404, 413, 422NoThe same request gets the same answer. Change the request or the file.

Sending the same conversion again is safe: a conversion changes nothing on our side, except that with StoreFile=true each successful request stores its own copy of the result, which expires after 3 hours. Each attempt counts toward your rate limit. Only a successful attempt counts toward your plan's conversions a month.

Before you see a busy 503 (the server is busy; retry shortly), the API has already retried for you: for requests up to 25 MB, our gateway sends a busy request up to two more times, each time to a container picked at random. Larger requests stream straight through to one container and are not retried on our side.

A timeout in your own client doesn't stop the conversion on our side, so retrying right away runs a second conversion of the same file. Give your client enough time instead: the examples below use 240 seconds, and Limits explains where that number comes from.

Retry-After

429 and 503 responses carry a Retry-After header with a whole number of seconds:

ResponseRetry-After
429 too many requests; slow down (rate limit)10
429 for conversions at once5
429 for a month's conversions used upThe seconds until the count starts again, at 00:00 UTC on the first day of next month
503 the server is busy; retry shortly5
503 for paused conversions600

Treat it as the shortest wait, not an exact one. If every client that got a 503 retries exactly 5 seconds later, they all arrive at the same moment and meet a busy server again.

A long Retry-After means that a retry loop won't help soon. The Python and Node.js examples below retry only when it is 60 seconds or less, and otherwise stop with the message. When the month's conversions are used up, stop sending conversions until the date in the message. GET /v2/usage shows how many are left before you get there.

Backoff with jitter

The Python and Node.js examples below retry failed connections, and 429 and 503 responses whose Retry-After is 60 seconds or less, up to 5 attempts in all. Before each retry they wait the Retry-After seconds plus a random extra delay whose upper bound doubles each time: up to 2 seconds after the first attempt, then 4, 8 and 16. A failed connection has no Retry-After, so only the random delay applies. The random part, called jitter, spreads clients out so they don't retry in step. Every other error is raised with its message and its x-request-id.

Each example converts report.docx to PDF. Download our test document (26 KB) and save it under that name to try them.

curl -sS --retry 4 --retry-max-time 120 -X POST https://api.pdfconversionapi.com/v2/convert/docx/to/pdf \
  -H "Authorization: Bearer $PDFCONVERSIONAPI_KEY" \
  -F File=@report.docx \
  -o response.json

How each version handles retries and time limits:

  • curl: --retry honors Retry-After (curl 7.66 or later) and otherwise doubles its wait, starting at 1 second. It adds no jitter, and it also retries 408, 500, 502 and 504 responses. --retry-max-time stops it from starting new attempts after that many seconds. When Retry-After is longer than --retry-max-time, as on a used-up month or paused conversions, curl doesn't retry and saves the error response.
  • Python: timeout=(10, 240) gives up if the connection takes more than 10 seconds to open, or if no data arrives for 240 seconds. A read timeout raises requests.ReadTimeout, which the function doesn't retry.
  • Node.js: AbortSignal.timeout(240_000) stops a request after 240 seconds in all, upload and download included.

We ran the three examples on 2026-11-01 against the API server running locally in a container, with only the base URL changed, through a small test proxy that answered the first request with our 503 response (Retry-After: 5) and the second with our 429 response (Retry-After: 10), then passed requests through. Each one waited at least 5 and then 10 seconds, and its third attempt returned the PDF. Versions: curl 8.7.1, Python 3.14.2 with requests 2.34.2, Node.js 24.15.0.

On 2026-11-02 we added the 60-second limit on waits to the Python and Node.js examples and ran them again against a small test server that stood in for the API. Given the same 503 and 429 and then a successful response, both waited as before and saved the file. Given the 429 for a used-up month, or the 503 for paused conversions (Retry-After: 600), both stopped after the first request and raised the message. The curl command above, with curl 8.7.1, also stopped after the first request in both cases and saved the error in response.json.

The request id: x-request-id

Every response from our API has an x-request-id header, errors and stored-file downloads included. On the hosted API it is a random UUID, new for each request. A response without it came from our cloud provider's network in front of the API, not from us.

Log the id next to your own record of each call. When you write to support@pdfconversionapi.com about a failed request, send:

  • the x-request-id,
  • the time of the request, with its time zone,
  • the endpoint, for example /v2/convert/docx/to/pdf, and the parameters you sent,
  • the status code and the Message.

Don't send your API key. If the file itself may be the cause, tell us whether you can share it; we don't keep a copy of anything you convert unless you stored it with StoreFile=true.

To read the id with curl, add it to the -w output (curl 7.84 or later):

Shell
curl -sS -o response.json -w '%{http_code} %header{x-request-id}\n' -X POST \
  https://api.pdfconversionapi.com/v2/convert/docx/to/pdf \
  -H "Authorization: Bearer $PDFCONVERSIONAPI_KEY" \
  -F File=@report.docx

In Python it is response.headers.get("x-request-id"), and in Node.js response.headers.get("x-request-id").