Every error the realpng API returns, with its status, its code, what it means and what to do about it.
Every failed call answers with an HTTP status and a JSON body whose code is stable. Branch on code, never on message, which is written for people and can change.
The body is not a JSON object. On POST /uploads, size is missing or not a positive whole number, or content_type is missing.
Send a JSON object. For an upload, send the file's exact size in bytes and its content_type.
invalid_image
The body sets none or more than one of image_url, image_base64, image_upload_id, video_url, video_upload_id, audio_url and audio_upload_id. Also sent when an upload id is not a UUID or the image is empty.
Send exactly one file field. An upload id is the id from POST /uploads.
invalid_url
image_url, video_url or audio_url is not http or https, is on a port other than the default, includes a user name or password, or points at a private, loopback or link local address, by IP, through DNS or through a redirect. Also a callback_url that is not https, is on a port other than the default, includes a user name or password, or is a private IP address.
Use a URL anyone on the internet can open, or upload the file.
image_unreachable
The image URL answered with a status other than 200, took too long to answer, or could not be fetched.
Check that the URL opens without a login or cookies. If the host blocks automated requests, upload the file instead.
video_unreachable
The video URL answered with a status other than 200, took too long to send the whole file, or could not be fetched.
Check that the URL opens without a login or cookies. A large video goes faster as an upload.
audio_unreachable
The voice clip's URL answered with a status other than 200, took too long to send the whole file, or could not be fetched.
Check that the URL opens without a login or cookies, or upload the file.
batch_unsupported
MCP only. The request body is a JSON-RPC batch, an array of messages.
Send one JSON-RPC message per request.
invalid_parameter
seconds is not a positive number. Otherwise the engine refused our request to it, which points to a fault on our side, not in your call.
Send a video's length in seconds, or leave seconds out. For any other cause, retry once. If it keeps failing, email hello@realpng.com.
The image is over the size limit for how you sent it. image_base64 has a lower limit than image_url and uploads. Also sent when the size you give POST /uploads is over the limit, or when a JSON request body is too large, including over MCP.
The voice clip is over the size limit, sent by URL.
Compress the clip, or send it as an MP3. See Video limits.
video_too_long
seconds is over the length limit. A video that runs past seconds, the length limit or the frame limit fails its job with the same code. detail has the numbers.
Send a shorter video, or the right seconds. See Video limits.
On POST /uploads, content_type is not a supported image, video or audio type. On a check, the file is not a supported type, is animated, or cannot be decoded. A check also answers it for a video or voice clip sent in an image field.
Convert the file to a supported type and send it again. Send a video as video_url or video_upload_id. An uploaded file needs a new upload.
audio_unsupported
The voice clip has no audio that can be decoded. It fails the clip's job.
Export the clip again as an MP3, WAV or M4A, then send it again.
video_unsupported
The video has no video stream that can be decoded, or no usable frame rate. It fails the video's job.
Export the video again as an MP4 with H.264, then send it again.
A video or voice check that fails while it runs is not an HTTP error. GET /audit/{id} carries its error, with the same code and message fields.
Code
What it means
What to do
job_timeout
The check did not finish in time.
Start a new check.
engine_error
The engine failed without naming the error.
Start a new check.
job_failed
Any other failure.
Start a new check.
video_too_long
The video runs past seconds, the length limit or the frame limit.
Send a shorter video, or the right seconds.
video_unsupported
The video could not be decoded.
Export it again as an MP4 with H.264.
audio_too_long
The voice clip runs past the length limit.
Send a shorter clip.
audio_unsupported
The voice clip could not be decoded.
Export it again as an MP3, WAV or M4A.
A code this table does not list means the same thing: the check failed. Its credits are given back. A new check of an uploaded file needs a new upload.
Refusals before any tool runs answer as HTTP errors in the shape above: 401 invalid_key, 402 plan_required and payment_failed, 429 rate_limited, 400 batch_unsupported, and 413 image_too_large for an oversized request body.
A request the MCP transport itself cannot read gets a JSON-RPC error object instead of that shape. That covers a missing MCP Accept header (406), a Content-Type other than JSON (415) and a body that is not a JSON-RPC message (400).
Every error inside a tool call comes back as a tool result with isError: true and the error's message as its text. The code is not included.