/v1/meta
Spec
Provalo dal vivo
10 chiamate gratuite al giorno — senza registrazione, senza chiave API. Passa dal gateway oanor.
Funziona. Prendi una chiave API e usala nel tuo progetto.
Ottieni una chiave APIFrammenti di codice
curl "https://api.oanor.com/dpi-api/v1/meta" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/dpi-api/v1/meta", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/dpi-api/v1/meta");
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/dpi-api/v1/meta",
headers={"x-oanor-key": "oanor_test_..."}
)
Risposta di esempio
Una risposta reale di questo endpoint, acquisita dall'ultimo health check.
{
"data": {
"name": "DPI & Print Size API",
"notes": "1 inch = 2.54 cm = 25.4 mm = 72 points. Converting to/from px needs a dpi. Nothing is stored.",
"version": "v1",
"endpoints": [
{
"path": "/v1/resolve",
"params": {
"dpi": "dots per inch",
"unit": "in|cm|mm|pt (default in)",
"length": "physical length",
"pixels": "pixel count"
},
"returns": "all of pixels, dpi and size (give any two)"
},
{
"path": "/v1/ppi",
"params": {
"width": "px",
"height": "px",
"diagonal": "screen diagonal in inches"
},
"returns": "PPI, dot pitch, megapixels and aspect ratio"
},
{
"path": "/v1/convert",
"params": {
"to": "px|in|cm|mm|pt",
"dpi": "needed when px is involved",
"from": "px|in|cm|mm|pt",
"value": "the length"
},
"returns": "the converted length"
},
{
"path": "/v1/meta",
"params": [],
"returns": "this document"
}
],
"description": "Resolution, print-size and pixel-density maths for print, design, photography and screens. The resolve endpoint takes any two of pixels, DPI and physical length and computes the third, returning the size in inches, centimetres, millimetres and points — so you can answer \"how big will a 3000-pixel image print at 300 DPI\" or \"what DPI do I get printing 3000 px at 10 inches\". The ppi endpoint computes a screen's pixel density from its resolution and diagonal size, plus the dot pitch in millimetres, the megapixels and the aspect ratio. The convert endpoint converts a length between pixels, inches, centimetres, millimetres and points (PostScript points, 1/72 inch), using a DPI when pixels are involved. Everything is computed locally and deterministically, so it is instant and private. Ideal for print and prepress, graphic and web design, photography, and screen and display specs. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 4 endpoints. This is DPI/print-size maths; for aspect ratios and resizing use an aspect-ratio API and for general unit conversion use a unit API."
},
"meta": {
"timestamp": "2026-06-03T17:42:13.262Z",
"request_id": "c77471b9-7e43-4358-b9a1-c712e52fc471"
},
"status": "ok",
"message": "Meta",
"success": true
}