Zum Inhalt springen
GET /v1/mix

Brown:green ratio for a target C:N

Live testen

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

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

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

API-Key holen

Code-Snippets

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

Beispiel-Response

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

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