Zum Inhalt springen
GET /v1/linear

Linear interpolation

Live testen

10 freie Calls pro Tag — keine Anmeldung, kein API-Key. Geht durchs oanor-Gateway.

Eigene Header (optional)
api.oanor.com/interpolation-api

Funktioniert. Hol dir einen API-Key und nutze sie in deinem Projekt.

API-Key holen

Code-Snippets

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

Beispiel-Response

Echte Antwort dieses Endpoints, erfasst beim letzten Health-Check.

{
    "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
}