Ir al contenido
GET /v1/ppi

Pixel density from resolution & diagonal

Pruébalo en vivo

10 llamadas gratis al día — sin registro, sin clave API. Pasa por el gateway de oanor.

Encabezados personalizados (opcional)
api.oanor.com/ppi-api

Funciona. Consigue una clave API y úsala en tu proyecto.

Obtener una clave API

Fragmentos de código

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_..."}
)

Respuesta de ejemplo

Una respuesta real de este endpoint, capturada en la última comprobación de estado.

{
    "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
}