Calc API

Free JSON HTTP API for lab and GMP calculators at https://api.molicheck.com. Molicheck web calculators still run locally in your browser; this API is for scripts and integrations.

Overview

All calculator endpoints return JSON with numeric values as strings in request and response bodies. Request schemas use additionalProperties: false. Regulatory endpoints may include structured citations in result when applicable.

Not regulatory advice. Check the current guideline text.

Base URL and limits

Base URL: https://api.molicheck.com

  • Rate limit: about 60 requests per 60 seconds per IP. When limited, the API returns 429 with a Retry-After header.
  • POST bodies must use Content-Type: application/json. Other content types receive 415.
  • OPTIONS on known routes returns 204 with CORS headers.

Authentication and CORS

No API keys. Anonymous access only. CORS allows any origin (Access-Control-Allow-Origin: *).

Endpoints

GET /v1/health

Liveness and version metadata. Example:

curl -sS https://api.molicheck.com/v1/health

Example response (live, 2026-10-22):

{"ok":true,"apiVersion":"v1","rulesVersion":"1.72"}

POST /v1/molarity

Solve for concentration, mass, or volume. Same rules as the molarity calculator.

curl -sS -X POST https://api.molicheck.com/v1/molarity \
  -H 'content-type: application/json' \
  -d '{ "solveFor": "concentration", "mass": "5.844", "massUnit": "g", "molecularWeight": "58.44", "volume": "1", "volumeUnit": "L", "concentrationUnit": "mol/L"}'

Example response (live, 2026-10-22):

{"ok":true,"apiVersion":"v1","rulesVersion":"1.72","disclaimer":"Not regulatory advice. Check the current guideline text.","result":{"value":"0.1000","unit":"mol/L","display":"0.1000 mol/L","secondary":"100.0 mmol/L","verdict":null,"working":["V = 1 L","n = 5.844 g ÷ 58.44 g/mol = 0.1000 mol","c = 0.1000 mol ÷ 1.000 L = 0.1000 mol/L"],"warnings":[],"citations":[],"methodNote":"c (mol/L) = mass (g) ÷ (MW (g/mol) × volume (L)); solve modes rearrange that identity. Units match the Molicheck molarity calculator."}}

Request body fields (from src/api/schemas.ts):

FieldTypeRequiredNotes
solveForenum: concentration | mass | volumeyes—
massstring (numericString)nomaxLength 32
massUnitenum: g | mg | µg | ngno—
molecularWeightstring (numericString)nomaxLength 32
volumestring (numericString)nomaxLength 32
volumeUnitenum: L | mL | µLno—
concentrationstring (numericString)nomaxLength 32
concentrationUnitenum: mol/L | mmol/L | µmol/L | nmol/Lno—

Other POST endpoints

Request bodies match the schemas in src/api/schemas.ts. Use the matching calculator page for field semantics and units.

  • POST /v1/c1v1 — Single-step C1V1 = C2V2 dilution. Calculator
  • POST /v1/ich-m7 — ICH M7(R2) TTC and less-than-lifetime intakes. Calculator
  • POST /v1/elemental-impurity — ICH Q3D elemental impurity limits (Option 1 / 2a / 2b). Calculator
  • POST /v1/aet — ICH Q3E draft analytical evaluation threshold (AET). Calculator
  • POST /v1/maco — EMA HBEL / PDE MACO and cleaning validation limits. Calculator

Errors

Failure envelope:

{
  "ok": false,
  "apiVersion": "v1",
  "rulesVersion": "1.73",
  "errors": [{ "code": "…", "path": "fieldName", "message": "…" }]
}

Common HTTP statuses: 400 validation, 415 wrong content type, 429 rate limited, 405 method not allowed (for example POST /v1/health).

Versioning

apiVersion is the URL major version (currently v1). rulesVersion tracks the site RULES_VERSION (1.73) and citation/limit data used by regulatory endpoints.

Not regulatory advice

API output is for planning and automation. Confirm limits and methods against your protocol and the current guideline text. Structured citations in responses point to registry sources; they do not replace judgment.