Skip to content
GET /v1/ppi

Pixel density from resolution & diagonal

Try it live

10 free calls per day — no sign-up, no API key. Goes through the oanor gateway.

Custom headers (optional)
api.oanor.com/ppi-api

It works. Grab an API key and use it in your project.

Get an API key

Code snippets

curl "https://api.oanor.com/ppi-api/v1/ppi" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/ppi-api/v1/ppi", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/ppi-api/v1/ppi");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
    "https://api.oanor.com/ppi-api/v1/ppi",
    headers={"x-oanor-key": "oanor_test_..."}
)

Example response

A real response from this endpoint, captured by the latest health check.

{
    "data": {
        "ppi": 91.79,
        "note": "PPI = √(width² + height²) ÷ diagonal (inches). Dot pitch is the distance between pixel centres.",
        "input": {
            "width": 1920,
            "height": 1080,
            "diagonal_inches": 24
        },
        "megapixels": 2.07,
        "aspect_ratio": "16:9",
        "dot_pitch_mm": 0.2767,
        "total_pixels": 2073600,
        "width_inches": 20.918,
        "height_inches": 11.766,
        "pixels_per_cm": 36.14,
        "diagonal_pixels": 2202.9
    },
    "meta": {
        "timestamp": "2026-06-03T17:41:55.923Z",
        "request_id": "931abbdb-8d90-474c-9fc9-286c6a9d661b"
    },
    "status": "ok",
    "message": "Pixel density",
    "success": true
}