/v1/chain-length
Chain length from sprockets & centre
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/chaindrive-api/v1/chain-length" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/chaindrive-api/v1/chain-length", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/chaindrive-api/v1/chain-length");
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/chaindrive-api/v1/chain-length",
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": {
"note": "Chain length in pitches = 2·C + (N1+N2)/2 + ((N2−N1)/2π)² ÷ C, with C the centre distance in pitches — then round UP to an even number so the chain closes without an offset link. The slack side should sag on the bottom; if you can't get an even count at the exact centre, nudge the centre distance or add a tensioner.",
"inputs": {
"pitch_in": 0.5,
"driven_teeth": 34,
"driver_teeth": 17,
"center_distance_in": 15
},
"exact_pitches": 85.74,
"chain_length_in": 43,
"chain_length_pitches": 86
},
"meta": {
"timestamp": "2026-06-06T23:53:58.407Z",
"request_id": "b31b466d-b076-4dec-a898-9bcea2016ce1"
},
"status": "ok",
"message": "Chain length",
"success": true
}