/v1/refraction
Snell's law refraction
Essayez-le en direct
10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.
Ça marche. Récupérez une clé API et utilisez-la dans votre projet.
Obtenez une clé APIExtraits de code
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_..."}
)
Exemple de réponse
Une réponse réelle de ce endpoint, capturée lors du dernier contrôle de santé.
{
"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
}