# 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](/pricing). Free has no API access, as [Authentication](/docs/authentication) explains.
- cURL, Node.js 18 or later running an ES module (a `.mjs` file), or Python with requests (`pip install requests`).

### 1. Create an API key

Open [API keys](/account#keys), choose **Create key** and give the key a name. Copy it right away. It is shown only once. [Authentication](/docs/authentication) covers keys in full.

### 2. Save the key

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

```bash title="Terminal"
export REALPNG_API_KEY="rp_live_YOUR_KEY"
```

Every example in these docs reads the key from `REALPNG_API_KEY`.

### 3. Check an image

Send a public image URL to `POST /audit`.

**Check an image by URL**

```bash title="cURL"
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"
  }'
```

```javascript title="JavaScript"
const res = await fetch("https://realpng.com/api/v1/audit", {
  method: "POST",
  headers: {
    "X-API-Key": process.env.REALPNG_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "image_url": "https://realpng.com/run-portrait.jpg"
  }),
});
const data = await res.json();
```

```python title="Python"
import os

import requests

res = requests.post(
    "https://realpng.com/api/v1/audit",
    headers={"X-API-Key": os.environ["REALPNG_API_KEY"]},
    json={
        "image_url": "https://realpng.com/run-portrait.jpg",
    },
)
data = res.json()
```

Response `200 OK`

```json
{
  "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](/docs/guides/upload-a-local-file). A check spends credits, and [Credits and limits](/docs/credits-and-limits) lists how many.

### 4. 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](/docs/guides/check-an-image) explains every field and the lanes.

If the call fails, the body carries a `code` instead. [Errors](/docs/errors) lists each one with its fix.

## Next steps

- [Check an image](/docs/guides/check-an-image): Every field in a verdict, and what each lane sees.

- [Optimize an image](/docs/guides/optimize-an-image): Start an optimization job and download the optimized image.

- [Upload a local file](/docs/guides/upload-a-local-file): Check or optimize a file from your disk.

- [Connect an agent](/docs/mcp): Give Claude Code, Codex, Cursor or Claude Desktop the MCP server.
