{"openapi":"3.1.0","info":{"title":"Viewing Distance API","version":"1.0.0","description":"TV and projector viewing-distance maths as an API, computed locally and deterministically. The distance endpoint takes a screen diagonal (inches or centimetres) and aspect ratio and returns the screen width and height and the recommended seating distance for each standard — SMPTE's 30° minimum viewing angle (the farthest comfortable seat), THX's 36° recommendation and THX's 40° maximum (the closest) — in inches, feet, centimetres and metres, plus an overall recommended range. Pass a resolution (720p, 1080p, 1440p, 4K or 8K) and it also gives the pixel-acuity distance, the point beyond which a 20/20 viewer can no longer resolve individual pixels, so moving closer stops adding detail. The screensize endpoint reverses it: from a seating distance it recommends the screen diagonal for each standard. The fov endpoint gives the horizontal field of view for a screen at a distance, with a verdict on whether it falls in the recommended range. The geometry is exact: width = diagonal × aspect-width / hypot(aspect), and distance = (width/2) / tan(angle/2). Everything is computed locally and deterministically, so it is instant and private. Ideal for home-theatre and AV apps, TV and monitor retail tools, room and seating planners, and AV-installer calculators. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is viewing-distance geometry; for pixel density (PPI) from a resolution use a PPI API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/viewdistance-api","description":"oanor gateway"}],"tags":[{"name":"View"},{"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/distance":{"get":{"operationId":"get_v1_distance","tags":["View"],"summary":"Viewing distance from screen size","description":"","parameters":[{"name":"diagonal","in":"query","required":true,"description":"Screen diagonal","schema":{"type":"string"},"example":"65"},{"name":"unit","in":"query","required":false,"description":"in|cm|m (default in)","schema":{"type":"string"},"example":"in"},{"name":"aspect","in":"query","required":false,"description":"Aspect ratio (default 16:9)","schema":{"type":"string"},"example":"16:9"},{"name":"resolution","in":"query","required":false,"description":"720p|1080p|1440p|4k|8k (for pixel acuity)","schema":{"type":"string"},"example":"4k"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Distance D = (width/2) / tan(angle/2). SMPTE 30° = farthest comfortable; THX 40° = closest. Wider angle = more immersive but needs higher resolution.","resolution":{"label":"4k","vertical_pixels":2160},"aspect_ratio":"16:9","screen_width":{"cm":143.9,"feet":4.72,"inches":56.7,"metres":1.44},"screen_height":{"cm":80.9,"feet":2.66,"inches":31.9,"metres":0.81},"diagonal_inches":65,"recommendations":{"thx_36deg":{"cm":221.4,"feet":7.26,"inches":87.2,"metres":2.21},"smpte_30deg":{"cm":268.5,"feet":8.81,"inches":105.7,"metres":2.69},"thx_40deg_max":{"cm":197.7,"feet":6.49,"inches":77.8,"metres":1.98}},"pixel_acuity_note":"At or beyond this distance a 20/20 viewer can no longer resolve individual pixels — moving closer stops adding detail.","recommended_range":{"closest":{"cm":197.7,"feet":6.49,"inches":77.8,"metres":1.98},"farthest":{"cm":268.5,"feet":8.81,"inches":105.7,"metres":2.69}},"pixel_acuity_distance":{"cm":128.8,"feet":4.23,"inches":50.7,"metres":1.29}},"meta":{"timestamp":"2026-06-04T01:59:10.450Z","request_id":"b5366382-256a-4011-8cce-dc2cd68c614b"},"status":"ok","message":"Recommended viewing distance from screen size","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/fov":{"get":{"operationId":"get_v1_fov","tags":["View"],"summary":"Field of view from distance & size","description":"","parameters":[{"name":"diagonal","in":"query","required":true,"description":"Screen diagonal","schema":{"type":"string"},"example":"65"},{"name":"unit","in":"query","required":false,"description":"Diagonal unit in|cm|m","schema":{"type":"string"},"example":"in"},{"name":"distance","in":"query","required":true,"description":"Seating distance","schema":{"type":"string"},"example":"105"},{"name":"distance_unit","in":"query","required":false,"description":"in|cm|m|ft","schema":{"type":"string"},"example":"in"},{"name":"aspect","in":"query","required":false,"description":"Aspect ratio","schema":{"type":"string"},"example":"16:9"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Horizontal field of view = 2 · atan(width / (2 · distance)). SMPTE recommends ≥30°, THX 36–40°.","assessment":"Within the SMPTE–THX recommended range.","aspect_ratio":"16:9","diagonal_inches":65,"distance_inches":105,"horizontal_fov_degrees":30.2},"meta":{"timestamp":"2026-06-04T01:59:10.542Z","request_id":"52228841-62da-466d-a842-38c149c2619b"},"status":"ok","message":"Field of view from distance and screen size","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/screensize":{"get":{"operationId":"get_v1_screensize","tags":["View"],"summary":"Screen size from seating distance","description":"","parameters":[{"name":"distance","in":"query","required":true,"description":"Seating distance","schema":{"type":"string"},"example":"105"},{"name":"unit","in":"query","required":false,"description":"in|cm|m|ft (default in)","schema":{"type":"string"},"example":"in"},{"name":"aspect","in":"query","required":false,"description":"Aspect ratio (default 16:9)","schema":{"type":"string"},"example":"16:9"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Recommended screen diagonal for this seating distance. SMPTE 30° gives the smallest, THX 40° the largest (most immersive).","distance":{"cm":266.7,"feet":8.75,"inches":105,"metres":2.67},"aspect_ratio":"16:9","recommended_range":{"largest":{"cm":222.7,"feet":7.31,"inches":87.7,"metres":2.23},"smallest":{"cm":164,"feet":5.38,"inches":64.6,"metres":1.64}},"recommended_diagonal":{"thx_36deg":{"cm":198.8,"feet":6.52,"inches":78.3,"metres":1.99},"smpte_30deg":{"cm":164,"feet":5.38,"inches":64.6,"metres":1.64},"thx_40deg_max":{"cm":222.7,"feet":7.31,"inches":87.7,"metres":2.23}}},"meta":{"timestamp":"2026-06-04T01:59:10.626Z","request_id":"9a867460-b691-488e-8c59-fc1f6fca2cfe"},"status":"ok","message":"Recommended screen size from seating distance","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":{"api":"viewdistance","note":"TV/projector viewing-distance maths — computed locally and deterministically, no key, no third-party service.","endpoints":["/v1/distance","/v1/screensize","/v1/fov","/v1/meta"],"standards":{"smpte":30,"thx_max":40,"thx_rec":36},"resolutions":["480p","720p","1080p","1440p","4k","2160p","8k","4320p"]},"meta":{"timestamp":"2026-06-04T01:59:10.705Z","request_id":"d12fc409-ce60-4013-990a-64b58a3b314e"},"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":13235,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":1475,"monthly_call_quota":22850,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":3465,"monthly_call_quota":278500,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":7265,"monthly_call_quota":1435000,"rps_limit":50,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/viewdistance-api"}