/v1/mix
Brown:green ratio for a target C:N
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/compost-api/v1/mix" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/compost-api/v1/mix", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/compost-api/v1/mix");
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/compost-api/v1/mix",
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": "To hit a target C:N from two materials, weight ratio brown:green = (green %C − target × green %N) ÷ (target × brown %N − brown %C). The target must sit between the two materials' own C:N ratios, or no positive mix reaches it. Mix by weight, then check moisture.",
"inputs": {
"target_cn": 30,
"brown_carbon_pct": 50,
"green_carbon_pct": 45,
"brown_nitrogen_pct": 1,
"green_nitrogen_pct": 2.5
},
"brown_cn": 50,
"green_cn": 18,
"brown_to_green_ratio": 1.5
},
"meta": {
"timestamp": "2026-06-06T15:30:45.845Z",
"request_id": "1adc6851-55ba-4d50-a784-e8523dd05944"
},
"status": "ok",
"message": "Mix ratio",
"success": true
}