Vai al contenuto
GET /v1/refraction

Snell's law refraction

Provalo dal vivo

10 chiamate gratuite al giorno — senza registrazione, senza chiave API. Passa dal gateway oanor.

Intestazioni personalizzate (facoltative)
api.oanor.com/snell-api

Funziona. Prendi una chiave API e usala nel tuo progetto.

Ottieni una chiave API

Frammenti di codice

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_..."}
)

Risposta di esempio

Una risposta reale di questo endpoint, acquisita dall'ultimo 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
}