{"openapi":"3.1.0","info":{"title":"Laser Beam Optics API","version":"1.0.0","description":"Gaussian-beam laser-optics maths as an API, computed locally and deterministically. The beam endpoint propagates a Gaussian beam from its wavelength and waist radius: the Rayleigh range z_R = π·w₀²/λ and depth of focus, the divergence half- and full-angle θ = λ/(π·w₀), and — for a given distance — the beam radius and diameter w(z) = w₀·√(1+(z/z_R)²); an optional M² beam-quality factor scales it for real beams. The focus endpoint computes the diffraction-limited focused spot of a lens, w_f = λ·f/(π·w_in), with the depth of focus and the f-number, so you can size the spot a lens will deliver. The irradiance endpoint turns a beam power and spot size into the beam area and the average and on-axis peak irradiance (power density) in W/m² and W/cm². Wavelengths are in nanometres, sizes in millimetres or micrometres, distances in metres and power in watts. Everything is computed locally and deterministically, so it is instant and private. Ideal for photonics, laser-engineering, materials-processing and optics app developers, beam-delivery and laser-safety tools, and physics education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is Gaussian-beam laser optics; for refraction use a Snell API and for thin-lens imaging a lens API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/laser-api","description":"oanor gateway"}],"tags":[{"name":"Laser"},{"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/beam":{"get":{"operationId":"get_v1_beam","tags":["Laser"],"summary":"Beam propagation","description":"","parameters":[{"name":"wavelength","in":"query","required":true,"description":"Wavelength (nm)","schema":{"type":"string"},"example":"1064"},{"name":"waist","in":"query","required":true,"description":"Beam-waist radius (mm)","schema":{"type":"string"},"example":"1"},{"name":"distance","in":"query","required":false,"description":"Distance (m) for the spot","schema":{"type":"string"},"example":"10"},{"name":"m_squared","in":"query","required":false,"description":"Beam quality M² (≥ 1)","schema":{"type":"string"},"example":"1"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Gaussian beam: z_R = πw₀²/λ, θ = λ/(πw₀), w(z) = w₀√(1+(z/z_R)²). M² ≥ 1 scales divergence.","inputs":{"m_squared":1,"wavelength_nm":1064,"waist_radius_mm":1},"distance_m":10,"beam_radius_mm":3.531363854,"beam_diameter_mm":7.062727709,"depth_of_focus_m":5.905249349,"rayleigh_range_m":2.952624674,"divergence_full_angle_deg":0.038810066,"divergence_full_angle_mrad":0.677363438,"divergence_half_angle_mrad":0.338681719},"meta":{"timestamp":"2026-06-05T03:09:03.487Z","request_id":"82c2c0fb-8d80-4847-b30f-33c4a5eb0a3c"},"status":"ok","message":"Beam propagation","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/focus":{"get":{"operationId":"get_v1_focus","tags":["Laser"],"summary":"Focused spot","description":"","parameters":[{"name":"wavelength","in":"query","required":true,"description":"Wavelength (nm)","schema":{"type":"string"},"example":"1064"},{"name":"focal_length","in":"query","required":true,"description":"Lens focal length (mm)","schema":{"type":"string"},"example":"100"},{"name":"input_radius","in":"query","required":true,"description":"Input beam radius (mm)","schema":{"type":"string"},"example":"2"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Diffraction-limited focal spot: w_f = λ·f/(π·w_in). A bigger input beam or shorter focal length gives a smaller spot.","inputs":{"wavelength_nm":1064,"focal_length_mm":100,"input_radius_mm":2},"f_number":25,"depth_of_focus_um":1693.408594,"focused_radius_um":16.934086,"rayleigh_range_um":846.704297,"focused_diameter_um":33.868172},"meta":{"timestamp":"2026-06-05T03:09:03.575Z","request_id":"5a8341f3-fcc7-4374-a1fc-dc0bc12e7dd0"},"status":"ok","message":"Focused spot","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/irradiance":{"get":{"operationId":"get_v1_irradiance","tags":["Laser"],"summary":"Irradiance","description":"","parameters":[{"name":"power","in":"query","required":true,"description":"Beam power (W)","schema":{"type":"string"},"example":"1"},{"name":"radius","in":"query","required":false,"description":"Spot radius (mm)","schema":{"type":"string"},"example":"1"},{"name":"diameter","in":"query","required":false,"description":"Or spot diameter (mm)","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Average irradiance = P/area over the 1/e² spot; a Gaussian's on-axis peak is twice the average.","inputs":{"power_w":1,"radius_mm":1},"beam_area_m2":3.141593e-6,"beam_area_cm2":0.031415927,"peak_irradiance_w_cm2":63.661977237,"average_irradiance_w_m2":318309.886184,"average_irradiance_w_cm2":31.830988618},"meta":{"timestamp":"2026-06-05T03:09:03.671Z","request_id":"325fdc0a-cc00-4095-a4be-ee83e98917f0"},"status":"ok","message":"Irradiance","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":"Wavelength in nm, waist/radius/input in mm, focal length in mm, distance in m, power in W; spot sizes are 1/e² radii. Add M² (≥1) for real beams.","service":"laser-api","formulae":{"divergence":"θ = λ/(π·w₀)","beam_radius":"w(z) = w₀·√(1+(z/z_R)²)","focused_waist":"w_f = λ·f/(π·w_in)","rayleigh_range":"z_R = π·w₀²/λ","peak_irradiance":"I₀ = 2P/(π·w²)"},"endpoints":{"GET /v1/beam":"Rayleigh range, divergence and the beam radius at a distance from wavelength and waist.","GET /v1/meta":"This document.","GET /v1/focus":"Diffraction-limited focused spot size and depth of focus of a lens.","GET /v1/irradiance":"Average and peak irradiance (power density) from power and spot size."},"description":"Gaussian-beam (laser) optics calculator: beam propagation (Rayleigh range, divergence, spot at a distance), the diffraction-limited focused spot of a lens, and beam irradiance from power and spot size."},"meta":{"timestamp":"2026-06-05T03:09:03.772Z","request_id":"1579e7c7-f1f1-4711-a5cf-6bc1c03f4813"},"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":2000,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":600,"monthly_call_quota":20000,"rps_limit":5,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":1800,"monthly_call_quota":120000,"rps_limit":15,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":5500,"monthly_call_quota":600000,"rps_limit":40,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/laser-api"}