# Garden Calculators – Compost C:N Ratio

> Garden Calculators – Compost C:N Ratio is a paid API for AI agents from garden-calc.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-30).

Calculates the carbon-to-nitrogen ratio of a compost mix using the Cornell formula, or determines greens-to-browns quantities needed to hit a target C:N ratio.

## Facts

- Endpoint: GET https://garden-calc.x402tookit.com/compost-cn-ratio?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/garden-calculators-compost-c-n-ratio-50b7f5a8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_hmaiPCfrY3fKgnGeaZN6_

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability garden-calculators-compost-c-n-ratio-50b7f5a8
```

Example prompt: What C:N ratio will I get if I mix 10 kg of grass clippings (80% moisture) with 6 kg of dry leaves (30% moisture)? Use the Cornell formula and tell me if the mix is within a good composting range.

## When to prefer this

Choose this endpoint when you need to compute or balance the carbon-to-nitrogen ratio of a compost mix using the Cornell formula, especially when you have named ingredients (grass, leaves, manure, sawdust) or custom C:N values. It supports both 'what is my current ratio?' (mix mode) and 'how much of each do I need?' (balance mode). Prefer it over generic nutrient calculators when the specific goal is compost pile optimization.

## Known failure modes

- Unknown ingredient name not in the built-in table and no custom C:N provided — returns error or missing data
- Missing required mode parameters (neither balance nor mix mode inputs supplied)
- Out-of-range C:N values (e.g. brownCn below 30 or above 1000) may return validation errors
- Malformed ingredients string (wrong separator or missing mass) causes parse failure
- Network or payment failure returns HTTP 402 or 5xx

## How this service works

Carbon-to-nitrogen ratio of a compost mix by the Cornell formula, or the greens-to-browns amounts that reach a target ratio.

## Output

Returns a structured object with the computed C:N ratio as a number and formatted text, a verdict on whether the mix is suitable for composting, a summary, per-ingredient breakdown (dry mass, as-is mass, C:N value and its source), reasons for the verdict, and a disclaimer. Also flags degraded results and lists any unchecked inputs.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "brown": {
       "type": "string",
       "description": "Balance mode: a carbon-rich ingredient (leaves, bark, paper, sawdust) or any name with brownCn"
      },
      "green": {
       "type": "string",
       "description": "Balance mode: a nitrogen-rich ingredient (grass clippings, food waste, cow manure, horse manure, digested sewage sludge) or any name with greenCn"
      },
      "brownCn": {
       "type": "number",
       "description": "C:N of the brown if not in the table, 30 to 1000"
      },
      "greenCn": {
       "type": "number",
       "description": "C:N of the green if not in the table, 5 to 60"
      },
      "targetCn": {
       "type": "number",
       "description": "Balance mode target C:N, 15 to 50 (default 30)"
      },
      "ingredients": {
       "type": "string",
       "description": "Mix mode: lines name:mass[:moisturePercent[:cn[:nitrogenPercent]]] separated by semicolons, for example 'grass clippings:10:80; leaves:6:30'. Names in the table need no C:N; moisture defaults to 50"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "cnRatio": {
       "type": [
        "null",
        "number"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "ratioText": {
       "type": [
        "null",
        "string"
       ]
      },
 
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/garden-calculators-compost-c-n-ratio-50b7f5a8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from garden-calc.x402tookit.com](https://www.zero.xyz/host/garden-calc.x402tookit.com/llms.txt)
