# ChemEq Balance Equation

> ChemEq Balance Equation is a paid API for AI agents from chemeq.openverbs.com, paid per call via x402, $0.004/call, status unknown (last checked 2026-09-14).

Balances a chemical equation (e.g. 'H2 + O2 -> H2O') into the smallest whole-number coefficients using exact rational linear algebra.

## Facts

- Endpoint: POST https://chemeq.openverbs.com/v1/balance
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/chemeq-balance-equation-e308a432
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_cgV1el_n-AtZ0-iN9_Xtz

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 chemeq-balance-equation-e308a432 -d '<json body>'
```

Example prompt: Can you balance this chemical equation for me: C3H8 + O2 -> CO2 + H2O? I need the smallest whole-number coefficients.

## When to prefer this

Choose this endpoint when you need precise, mathematically exact balancing of chemical equations using rational linear algebra — not heuristic or approximate methods. It handles any well-formed equation with a '->' or '=' arrow and returns guaranteed minimal integer coefficients. Prefer it over general-purpose LLMs or chemistry toolkits when correctness and reproducibility matter, such as in educational tools, stoichiometry calculators, or automated chemistry pipelines.

## Known failure modes

- 400 error when equation cannot be balanced with positive integer coefficients (e.g. impossible reaction)
- 400 error for malformed equation strings missing arrow or valid chemical formulas
- Empty or missing 'equation' field returns validation error
- Unrecognized element symbols or syntax errors in formula string

## How this service works

Balance an equation such as "H2 + O2 -> H2O" into the smallest whole-number coefficients using exact rational linear algebra. Equations that cannot be balanced with positive coefficients are clean 400s.

## Output

Returns the smallest whole-number stoichiometric coefficients for each species in the balanced equation, computed via exact rational linear algebra. Returns a clean 400 error if the equation cannot be balanced with positive integer coefficients.

## Request schema (JSON Schema)

```json
{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "type": "object",
 "properties": {
  "input": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "type": "string",
     "enum": [
      "POST"
     ]
    },
    "bodyType": {
     "type": "string",
     "enum": [
      "json",
      "form-data",
      "text"
     ]
    },
    "body": {
     "type": "object",
     "properties": {
      "equation": {
       "type": "string",
       "minLength": 1,
       "description": "Unbalanced equation, e.g. \"C3H8 + O2 -> CO2 + H2O\". Arrow may be \"->\" or \"=\"."
      }
     },
     "required": [
      "equation"
     ],
     "additionalProperties": false
    }
   },
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "additionalProperties": false
  }
 },
 "required": [
  "input"
 ]
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/chemeq-balance-equation-e308a432/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from chemeq.openverbs.com](https://www.zero.xyz/host/chemeq.openverbs.com/llms.txt)
