Aller au contenu
GET /v1/ratio

Ratio from amounts

Essayez-le en direct

10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.

En-têtes personnalisés (facultatif)
api.oanor.com/twostroke-api

Ça marche. Récupérez une clé API et utilisez-la dans votre projet.

Obtenez une clé API

Extraits de code

curl "https://api.oanor.com/twostroke-api/v1/ratio" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/twostroke-api/v1/ratio", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/twostroke-api/v1/ratio");
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/twostroke-api/v1/ratio",
    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": "Ratio = fuel ÷ oil (both in the same unit), reported as N:1. A bigger first number is leaner (less oil). Always use the ratio your engine's manual specifies; too little oil seizes it, too much fouls plugs and smokes.",
        "ratio": 50,
        "inputs": {
            "oil": 100,
            "fuel": 5000,
            "unit": "ml"
        },
        "oil_percent": 1.96,
        "ratio_label": "50:1",
        "nearest_common_ratio": "50:1"
    },
    "meta": {
        "timestamp": "2026-06-06T07:13:56.631Z",
        "request_id": "28a15af7-b16f-408f-b9d1-b07a20b49b26"
    },
    "status": "ok",
    "message": "Identify ratio",
    "success": true
}