realpng
Docs

Introduction

realpng checks images and videos for signs of AI generation and optimizes them, over a REST API or an MCP server your agent can call.

Check and optimize

Check tells you whether an image reads as AI, through POST /audit or the MCP tool audit_image. It answers in the same request with a verdict, a score and the three lanes it weighed: pixels, watermark and provenance. See Check an image.

Optimize re-renders and re-grains an image for posting, through POST /optimize or the MCP tool process_image. Nothing is cropped, an image over 2048 px on its long edge comes back at 2048, and you get back a PNG with an optimization score. An optimization runs as a job, so POST /optimize returns at once with its id, as Optimize an image explains.

Both take videos too, as jobs you poll, and give back an MP4 with each frame's reading. See Check and optimize a video.

Both spend credits from your plan. Credits and limits lists what each costs.

API or MCP

SurfaceUse it when
REST APIYour own code, pipelines or automations call realpng. Only the API takes callback_url for optimizations and detail=full for a check's raw engine report.
MCP serverAn agent such as Claude Code, Codex, Cursor or Claude Desktop calls realpng as tools while it works. An optimization waits inside the tool call and hands back an id to resume. See the six tools.

Both need a paid plan and take the same API key. They share one pool of credits and the same rate limits. Connect an agent sets up the MCP server.

Base URL

Every endpoint lives under https://realpng.com/api/v1. Request bodies and responses are JSON, apart from the optimized file itself. Every call needs an API key, except downloading an optimized file.

The OpenAPI 3.1 spec is at https://realpng.com/api/v1/openapi.json and needs no key. Every error has one JSON shape with a stable code, listed in Errors.

Build with an agent

Paste this prompt into your coding agent to start an integration.

Prompt for your agent
Add realpng to this project to check images for AI generation and optimize them.
Read https://realpng.com/docs/llms.txt before anything else, then follow https://realpng.com/docs/quickstart.md.
Read the API key from the REALPNG_API_KEY environment variable. Never write the key into code or logs.

Every page is also available as Markdown by appending .md to its URL, for example /docs/quickstart.md.

Next steps