{"openapi":"3.1.0","info":{"title":"Wavelength API","version":"1.0.0","description":"Electromagnetic-wave maths as an API, computed locally and deterministically. The convert endpoint converts between wavelength and frequency (λ = c ÷ f) and also reports the period, the wavenumber, the photon energy and the part of the spectrum — optionally for light travelling in a medium of a given refractive index, where the wavelength scales by 1/n while the frequency stays the same. The energy endpoint gives the photon energy in joules, electron-volts and kilo-electron-volts from a wavelength or frequency (E = h·f = h·c ÷ λ). The band endpoint classifies a wavelength or frequency into the electromagnetic spectrum — radio, microwave, infrared, visible, ultraviolet, X-ray or gamma — and adds the ITU radio sub-band (ELF through EHF) and the approximate colour for visible light. Frequencies accept Hz/kHz/MHz/GHz/THz and wavelengths m/cm/mm/µm/nm/pm/ångström. Everything is computed locally and deterministically, so it is instant and private. Ideal for RF and antenna tools, optics and photonics, spectroscopy and lab software, physics and astronomy education, and amateur radio. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is electromagnetic-wave physics; for general unit conversion use a unit-conversion API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/wavelength-api","description":"oanor gateway"}],"tags":[{"name":"Wave"},{"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/band":{"get":{"operationId":"get_v1_band","tags":["Wave"],"summary":"EM spectrum band","description":"","parameters":[{"name":"wavelength","in":"query","required":false,"description":"Wavelength (default nm)","schema":{"type":"string"},"example":"500"},{"name":"wavelength_unit","in":"query","required":false,"description":"m|nm|um|…","schema":{"type":"string"},"example":"nm"},{"name":"frequency","in":"query","required":false,"description":"Or frequency","schema":{"type":"string"}},{"name":"frequency_unit","in":"query","required":false,"description":"hz|mhz|ghz","schema":{"type":"string"},"example":"hz"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"band":"visible","note":"EM spectrum band by wavelength. Radio/microwave include the ITU sub-band (ELF…EHF); visible includes the approximate colour.","input":[],"band_detail":"green light","frequency_hz":599585000000000,"wavelength_m":5.0e-7},"meta":{"timestamp":"2026-06-04T01:59:16.653Z","request_id":"8e226287-45eb-476f-ac31-540402692062"},"status":"ok","message":"EM band classification","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/convert":{"get":{"operationId":"get_v1_convert","tags":["Wave"],"summary":"Wavelength <-> frequency","description":"","parameters":[{"name":"frequency","in":"query","required":false,"description":"Frequency value","schema":{"type":"string"},"example":"100"},{"name":"frequency_unit","in":"query","required":false,"description":"hz|khz|mhz|ghz|thz","schema":{"type":"string"},"example":"mhz"},{"name":"wavelength","in":"query","required":false,"description":"Or wavelength value","schema":{"type":"string"}},{"name":"wavelength_unit","in":"query","required":false,"description":"m|cm|mm|um|nm|pm","schema":{"type":"string"},"example":"nm"},{"name":"refractive_index","in":"query","required":false,"description":"Medium n (default 1)","schema":{"type":"string"},"example":"1"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"band":"radio","note":"λ = (c/n) / f. Frequency is the same in any medium; wavelength scales by 1/n. Default n = 1 (vacuum).","input":{"refractive_index":1},"period_s":1.0e-8,"band_detail":"VHF band","frequency_hz":100000000,"wavelength_m":2.99792,"frequency_mhz":100,"frequency_thz":0.0001,"wavelength_cm":299.792,"wavelength_nm":2997920000,"photon_energy_j":6.62607e-26,"photon_energy_ev":4.13567e-7,"wavenumber_cm_inv":0.00333564},"meta":{"timestamp":"2026-06-04T01:59:16.746Z","request_id":"efc2ef89-c561-4164-8a7e-b85271e07fe1"},"status":"ok","message":"Wavelength / frequency","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/energy":{"get":{"operationId":"get_v1_energy","tags":["Wave"],"summary":"Photon energy","description":"","parameters":[{"name":"wavelength","in":"query","required":false,"description":"Wavelength (default nm)","schema":{"type":"string"},"example":"500"},{"name":"wavelength_unit","in":"query","required":false,"description":"m|nm|um|…","schema":{"type":"string"},"example":"nm"},{"name":"frequency","in":"query","required":false,"description":"Or frequency","schema":{"type":"string"}},{"name":"frequency_unit","in":"query","required":false,"description":"hz|mhz|ghz|thz","schema":{"type":"string"},"example":"hz"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Photon energy E = h·f = h·c/λ. 1 eV = 1.602176634e-19 J. Wavelength defaults to nm here.","input":[],"frequency_hz":599585000000000,"photon_energy_j":3.97289e-19,"photon_energy_ev":2.47968,"photon_energy_kev":0.00247968},"meta":{"timestamp":"2026-06-04T01:59:16.838Z","request_id":"cb4b5713-3da2-46d7-998b-b28c88dbd13e"},"status":"ok","message":"Photon energy","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":{"note":"Vacuum by default; pass refractive_index for light in a medium.","service":"wavelength","constants":{"ev_in_joules":1.602176634e-19,"speed_of_light_m_s":299792458,"planck_constant_j_s":6.62607015e-34},"endpoints":{"/v1/band":"Classify the EM-spectrum band (radio sub-band, visible colour, …) of a wavelength or frequency.","/v1/energy":"Photon energy (J, eV, keV) from a wavelength or frequency.","/v1/convert":"Convert between wavelength and frequency (with photon energy, wavenumber and band), optionally in a medium."},"description":"Electromagnetic wave maths: wavelength/frequency conversion, photon energy, and EM-spectrum band classification.","frequency_units":["hz","khz","mhz","ghz","thz","phz"],"wavelength_units":["m","km","cm","mm","um","micron","nm","pm","angstrom","a"]},"meta":{"timestamp":"2026-06-04T01:59:16.911Z","request_id":"dfbd336d-4329-4a67-b707-fe49b3485c84"},"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":11635,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":1315,"monthly_call_quota":21250,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":3305,"monthly_call_quota":262500,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":7105,"monthly_call_quota":1355000,"rps_limit":50,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/wavelength-api"}