/v1/refraction
Snell's law refraction
Try it live
10 free calls per day — no sign-up, no API key. Goes through the oanor gateway.
It works. Grab an API key and use it in your project.
Get an API keyCode snippets
curl "https://api.oanor.com/snell-api/v1/refraction" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/snell-api/v1/refraction", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/snell-api/v1/refraction");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
"https://api.oanor.com/snell-api/v1/refraction",
headers={"x-oanor-key": "oanor_test_..."}
)
Example response
A real response from this endpoint, captured by the latest health check.
{
"data": {
"formula": "n1·sin(θ1) = n2·sin(θ2).",
"index_1": 1,
"index_2": 1.333,
"medium_1": "explicit",
"medium_2": "explicit",
"incidence_angle_deg": 30,
"refraction_angle_deg": 22.03011,
"total_internal_reflection": false
},
"meta": {
"timestamp": "2026-06-04T10:18:57.283Z",
"request_id": "5bb935de-b93a-4f63-b868-67c180dc09fe"
},
"status": "ok",
"message": "Snell's law refraction",
"success": true
}