realpng
Docs

Quickstart

Create an API key and check your first image in about two minutes, with cURL, JavaScript or Python.

Before you start

  • A paid plan. Free has no API access, as Authentication explains.
  • cURL, Node.js 18 or later running an ES module (a .mjs file), or Python with requests (pip install requests).

Create an API key

Open API keys, choose Create key and give the key a name. Copy it right away. It is shown only once. Authentication covers keys in full.

Save the key

Export the key in your terminal, so it stays out of your code.

Terminal
export REALPNG_API_KEY="rp_live_YOUR_KEY"

Every example in these docs reads the key from REALPNG_API_KEY.

Check an image

Send a public image URL to POST /audit.

Check an image by URL
curl -X POST "https://realpng.com/api/v1/audit" \
  -H "X-API-Key: $REALPNG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "image_url": "https://realpng.com/run-portrait.jpg"
  }'
200 OK
{
  "verdict": "ai",
  "score": 96,
  "decided_by": "pixels",
  "lanes": {
    "pixels": {
      "verdict": "ai",
      "score": 96
    },
    "watermark": {
      "verdict": "none",
      "score": 2
    },
    "provenance": {
      "verdict": "nothing",
      "issuer": null
    }
  },
  "media": "image"
}

Swap image_url for your own public image. For a file on disk, see Upload a local file. A check spends credits, and Credits and limits lists how many.

Read the verdict

verdict is the answer, and score is how strongly the image leans toward AI. The response above is an example, so your score may differ. Check an image explains every field and the lanes.

If the call fails, the body carries a code instead. Errors lists each one with its fix.

Next steps