/v1/linear
Linear interpolation
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/interpolation-api/v1/linear" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/interpolation-api/v1/linear", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/interpolation-api/v1/linear");
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/interpolation-api/v1/linear",
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": {
"t": 0.3,
"x": 3,
"y": 30,
"note": "Linear interpolation y = y0 + (y1−y0)·(x−x0)/(x1−x0). 'extrapolated' is true when the point lies outside the segment.",
"inputs": {
"point0": [
0,
0
],
"point1": [
10,
100
]
},
"extrapolated": false
},
"meta": {
"timestamp": "2026-06-04T18:38:06.713Z",
"request_id": "5bef30b7-24d8-48c4-8a26-3bed2a17107e"
},
"status": "ok",
"message": "Linear interp",
"success": true
}