API & MCP
Everything a person can do on Chemical Equation Balancer & Stoichiometry, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://prooflinereactionbalancer.usefulweb.site/api/v1/calculate– run Chemical Equation Balancer & StoichiometryGET https://prooflinereactionbalancer.usefulweb.site/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Chemical Equation Balancer & Stoichiometry
Type a reaction such as C3H8 + O2 -> CO2 + H2O or an ionic redox equation such as MnO4- + Fe+2 + H+ -> Mn+2 + Fe+3 + H2O and get the smallest whole-number coefficients, computed exactly from the null space of the composition matrix. The tool tells you when a reaction cannot be balanced, when a species does not take part and when the species allow several independent reactions. Add starting masses or amounts to get the limiting reagent, the theoretical yield of every product, the leftovers and your percentage yield. Part of the Proofline math notebook.
| Field | Type | Default | Description |
|---|---|---|---|
equation (required) | text | — | Reaction. Reactants, an arrow (-> = → or <=>), then products, separated by “ + ”. Write charges at the end of ions (Fe+2, MnO4-, SO4^2-) and electrons as e-. Element symbols with counts (H2O), brackets ( ) and [ ] that may nest (K4[Fe(CN)6]), hydrates with · or * or a dot (CuSO4·5H2O), charges at the end (SO4^2-, Fe+3, NH4+), isotopes (^13C, D, T) and state symbols such as (aq), which are ignored. Coefficients you type are checked and replaced by the balanced ones. |
amounts | textarea | — | Starting amounts of reactants (optional). Each reactant with a mass (g, mg, kg) or an amount (mol, mmol). Reactants left out are assumed to be in excess. |
actualYield | text | — | Actual yield (optional). The amount of a product you obtained, to calculate the percentage yield. |
Example request
Combustion of propane
curl -X POST https://prooflinereactionbalancer.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"equation":"C3H8 + O2 -> CO2 + H2O"}'
Every result contains
inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.
MCP (Model Context Protocol)
- Streamable HTTP endpoint:
https://prooflinereactionbalancer.usefulweb.site/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
proofline_reaction_balancer - Local stdio connector:
node src/mcp-stdio.ts --tool=proofline-reaction-balancer
{
"mcpServers": {
"proofline-reaction-balancer": { "type": "http", "url": "https://prooflinereactionbalancer.usefulweb.site/mcp" }
}
}