# ForgeMesh Molar Mass / Molecular Weight API

> ForgeMesh Molar Mass / Molecular Weight API is a paid API for AI agents from x402.forgemesh.io, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-13).

Calculates the molar mass of any chemical formula in g/mol, with per-element mass contributions and percentage breakdowns, supporting nested groups and hydrates.

## Facts

- Endpoint: POST https://x402.forgemesh.io/molecular-weight
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/forgemesh-molar-mass-molecular-weight-api-222453b7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_WARwCQjXMsLvvxC6kHBPG

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 forgemesh-molar-mass-molecular-weight-api-222453b7 -d '<json body>'
```

Example prompt: What's the molar mass of copper sulfate pentahydrate (CuSO4·5H2O)? Also break down how much each element contributes by mass.

## When to prefer this

Choose this endpoint when you need a programmatic, per-element breakdown of molecular weight for arbitrary chemical formulas — especially formulas with nested groups like Ca(OH)2 or hydrates like CuSO4·5H2O — rather than a simple lookup table or calculator that only handles simple linear formulas.

## Known failure modes

- Invalid or unparseable chemical formula returns an error
- Unsupported characters or isotope notation may not be handled
- Unknown element symbols in the formula cause a parse failure
- Missing required 'formula' field returns a validation error
- Payment not completed or insufficient USDC balance results in 402 rejection

## How this service works

Molar mass API: the molecular weight of any chemical formula (H2O, C6H12O6, Ca(OH)2, CuSO4·5H2O) in g/mol, with a per-element mass breakdown and mass percentages. Nested groups and hydrates supported.

## Output

Returns the total molar mass in g/mol for the given chemical formula, along with a per-element breakdown showing each element's absolute mass contribution and its percentage of the total molecular weight. Supports nested parenthetical groups (e.g. Ca(OH)2) and hydrate dot notation (e.g. CuSO4·5H2O).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "formula": {
   "type": "string",
   "description": "chemical formula e.g. C6H12O6"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "atom_count": 3,
  "composition": [
   {
    "count": 2,
    "element": "H",
    "mass_percent": 11.19
   },
   {
    "count": 1,
    "element": "O",
    "mass_percent": 88.81
   }
  ],
  "molar_mass_g_per_mol": 18.015
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/forgemesh-molar-mass-molecular-weight-api-222453b7/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.forgemesh.io](https://www.zero.xyz/host/x402.forgemesh.io/llms.txt)
