{"openapi":"3.1.0","info":{"title":"Black Hole Physics API","version":"1.0.0","description":"Black-hole general-relativity maths as an API, computed locally and deterministically. The radius endpoint computes the Schwarzschild radius r_s = 2GM/c² — the event horizon of a non-rotating black hole — from a mass given in kilograms or solar masses, together with the photon sphere at 1.5·r_s and the innermost stable circular orbit (ISCO) at 3·r_s; the Sun would have an event horizon about 2.95 km across and the Earth about 9 mm. The time-dilation endpoint computes the gravitational time-dilation factor √(1 − r_s/r) at a distance r from a mass — a clock deep in a gravity well ticks slower than a far-away clock, and at the horizon time appears to stop. The hawking endpoint computes the Hawking temperature T = ħc³/(8πGMk_B), which is higher for smaller black holes, and the evaporation time, which scales as the cube of the mass — a solar-mass black hole would take about 10^67 years to evaporate. Masses are in kilograms or solar masses and distances in metres, using G, c, ħ and the Boltzmann constant. Everything is computed locally and deterministically, so it is instant and private. Ideal for astrophysics, cosmology, science-communication, simulation and education app developers, black-hole and relativity tools, and physics teaching. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is general-relativity black-hole physics; for special relativity (Lorentz factor, E=mc²) use a relativity API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/schwarzschild-api","description":"oanor gateway"}],"tags":[{"name":"BlackHole"},{"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/hawking":{"get":{"operationId":"get_v1_hawking","tags":["BlackHole"],"summary":"Hawking temperature","description":"","parameters":[{"name":"mass","in":"query","required":false,"description":"Mass (kg)","schema":{"type":"string"}},{"name":"solar_masses","in":"query","required":false,"description":"Or solar masses","schema":{"type":"string"},"example":"1"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Hawking temperature T = ħc³/(8πGMk_B) — smaller black holes are hotter. Evaporation time scales as M³; a solar-mass black hole would take ~10^67 years to evaporate.","inputs":{"mass_kg":1.98892e+30,"solar_masses":1},"evaporation_time_s":6.617961757605733e+74,"hawking_temperature_k":6.168677824358303e-8,"evaporation_time_years":2.0971055332489585e+67},"meta":{"timestamp":"2026-06-05T19:50:33.596Z","request_id":"a0aca178-bc8a-43b9-b94a-d3b6f7a1f13b"},"status":"ok","message":"Hawking temperature","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/radius":{"get":{"operationId":"get_v1_radius","tags":["BlackHole"],"summary":"Schwarzschild radius","description":"","parameters":[{"name":"mass","in":"query","required":false,"description":"Mass (kg)","schema":{"type":"string"}},{"name":"solar_masses","in":"query","required":false,"description":"Or mass in solar masses","schema":{"type":"string"},"example":"1"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Schwarzschild radius r_s = 2GM/c² — the event horizon of a non-rotating black hole. The photon sphere is at 1.5·r_s and the innermost stable circular orbit (ISCO) at 3·r_s. The Sun's r_s is about 2.95 km.","inputs":{"mass_kg":1.98892e+30,"solar_masses":1},"isco_m":8862.023209,"photon_sphere_m":4431.011605,"schwarzschild_radius_m":2954.007736491099,"schwarzschild_radius_km":2.954007736},"meta":{"timestamp":"2026-06-05T19:50:33.704Z","request_id":"ec8ae164-0570-40f1-8cb9-dba94e738574"},"status":"ok","message":"Schwarzschild radius","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/time-dilation":{"get":{"operationId":"get_v1_time_dilation","tags":["BlackHole"],"summary":"Gravitational time dilation","description":"","parameters":[{"name":"mass","in":"query","required":false,"description":"Mass (kg)","schema":{"type":"string"}},{"name":"solar_masses","in":"query","required":false,"description":"Or solar masses","schema":{"type":"string"},"example":"1"},{"name":"distance","in":"query","required":true,"description":"Distance r from centre (m)","schema":{"type":"string"},"example":"5908"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Gravitational time dilation: a clock at radius r ticks at √(1 − r_s/r) of the rate of a far-away clock. Deep in a gravity well time runs slow; at the horizon it appears to stop.","inputs":{"mass_kg":1.98892e+30,"distance":5908},"inverse_factor":1.41421541,"proper_time_ratio":0.7071058552,"time_dilation_factor":0.7071058552,"schwarzschild_radius_m":2954.007736},"meta":{"timestamp":"2026-06-05T19:50:33.784Z","request_id":"6c9b0ba3-dc89-41ba-9bb0-3d54617aca6c"},"status":"ok","message":"Time dilation","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":{"notes":"Mass in kg or 'solar_masses', distance in m. Non-rotating (Schwarzschild) black hole. The horizon is at r_s; time dilation diverges there.","service":"schwarzschild-api","formulae":{"hawking":"T = ħc³/(8πGMk_B)","schwarzschild":"r_s = 2GM/c²","time_dilation":"√(1 − r_s/r)"},"constants":{"G":6.6743e-11,"c":299792458,"k_B":1.380649e-23,"hbar":1.054571817e-34,"solar_mass_kg":1.98892e+30},"endpoints":{"GET /v1/meta":"This document.","GET /v1/radius":"Schwarzschild radius, photon sphere and ISCO from a mass.","GET /v1/hawking":"Hawking temperature and evaporation time of a black hole.","GET /v1/time-dilation":"Gravitational time-dilation factor at a distance from a mass."},"description":"Black-hole general-relativity calculator: Schwarzschild radius and orbits, gravitational time dilation, and Hawking temperature and evaporation time."},"meta":{"timestamp":"2026-06-05T19:50:33.852Z","request_id":"eb15aa82-147a-448d-83b1-bc54e6a35035"},"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":3750,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":500,"monthly_call_quota":35500,"rps_limit":6,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":1400,"monthly_call_quota":216500,"rps_limit":15,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":4400,"monthly_call_quota":1305000,"rps_limit":40,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/schwarzschild-api"}