/v1/refraction
Snell's law refraction
Pruébalo en vivo
10 llamadas gratis al día — sin registro, sin clave API. Pasa por el gateway de oanor.
Funciona. Consigue una clave API y úsala en tu proyecto.
Obtener una clave APIFragmentos de código
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_..."}
)
Respuesta de ejemplo
Una respuesta real de este endpoint, capturada en la última comprobación de estado.
{
"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
}