{"openapi":"3.1.0","info":{"title":"DPI & Print Size API","version":"1.0.0","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 total 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 and print-size maths; for aspect ratios and resizing use an aspect-ratio API and for general unit conversion use a unit API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/dpi-api","description":"oanor gateway"}],"tags":[{"name":"DPI"},{"name":"Meta"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/convert":{"get":{"operationId":"get_v1_convert","tags":["DPI"],"summary":"Convert a length","description":"","parameters":[{"name":"value","in":"query","required":true,"description":"The length","schema":{"type":"string"},"example":"300"},{"name":"from","in":"query","required":true,"description":"px|in|cm|mm|pt","schema":{"type":"string"},"example":"px"},{"name":"to","in":"query","required":true,"description":"px|in|cm|mm|pt","schema":{"type":"string"},"example":"in"},{"name":"dpi","in":"query","required":false,"description":"Needed for px","schema":{"type":"string"},"example":"150"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"to":"in","dpi":150,"from":"px","value":300,"result":2},"meta":{"timestamp":"2026-06-03T17:42:12.971Z","request_id":"8d26952d-dcb7-4175-82fe-7da5b5aeb5e1"},"status":"ok","message":"Convert","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/ppi":{"get":{"operationId":"get_v1_ppi","tags":["DPI"],"summary":"Screen pixel density","description":"","parameters":[{"name":"width","in":"query","required":true,"description":"Width in px","schema":{"type":"string"},"example":"1920"},{"name":"height","in":"query","required":true,"description":"Height in px","schema":{"type":"string"},"example":"1080"},{"name":"diagonal","in":"query","required":true,"description":"Diagonal in inches","schema":{"type":"string"},"example":"24"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"ppi":91.7878,"width_px":1920,"height_px":1080,"megapixels":2.0736,"aspect_ratio":"16:9","dot_pitch_mm":0.276725,"diagonal_inches":24},"meta":{"timestamp":"2026-06-03T17:42:13.051Z","request_id":"28f5d491-caec-418e-a9db-4a673e7ec59a"},"status":"ok","message":"PPI","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/resolve":{"get":{"operationId":"get_v1_resolve","tags":["DPI"],"summary":"Pixels / DPI / size (give any two)","description":"","parameters":[{"name":"pixels","in":"query","required":false,"description":"Pixel count","schema":{"type":"string"},"example":"3000"},{"name":"dpi","in":"query","required":false,"description":"Dots per inch","schema":{"type":"string"},"example":"300"},{"name":"length","in":"query","required":false,"description":"Physical length","schema":{"type":"string"}},{"name":"unit","in":"query","required":false,"description":"in|cm|mm|pt","schema":{"type":"string"},"example":"in"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"cm":25.4,"mm":254,"dpi":300,"inches":10,"pixels":3000,"points":720},"meta":{"timestamp":"2026-06-03T17:42:13.158Z","request_id":"c38fac87-af0d-48a7-bd2c-aaa501bf86da"},"status":"ok","message":"Resolve","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/meta":{"get":{"operationId":"get_v1_meta","tags":["Meta"],"summary":"Spec","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"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}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":6535,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":805,"monthly_call_quota":16050,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":2795,"monthly_call_quota":211500,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":6595,"monthly_call_quota":1100000,"rps_limit":50,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/dpi-api"}