# x402.forgemesh.io Mole Conversion API

> x402.forgemesh.io Mole Conversion 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-15).

Converts between grams, moles, and molecules for any chemical formula using computed molar mass and Avogadro's number.

## Facts

- Endpoint: POST https://x402.forgemesh.io/grams-to-moles
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-forgemesh-io-mole-conversion-api-c2de3040
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_A9jNhDXf2r2R8xs5E6oxe

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 x402-forgemesh-io-mole-conversion-api-c2de3040 -d '<json body>'
```

Example prompt: How many moles are in 18 grams of H2O? Also tell me how many individual molecules that works out to.

## When to prefer this

Use this endpoint when an AI agent needs to perform stoichiometric unit conversions between grams, moles, and molecules for a specific chemical formula — particularly in chemistry tutoring, lab calculation automation, or reaction planning workflows where molar mass lookup and Avogadro's number arithmetic would otherwise need to be computed manually.

## Known failure modes

- Invalid or unparseable chemical formula returns an error
- Missing both grams and moles input with no basis for conversion
- Formula contains unsupported or unknown elements
- Negative or zero quantity input may produce an error or undefined result
- Malformed request body returns a 400-level error

## How this service works

Mole conversion API: convert grams↔moles↔molecules for any chemical formula, using its computed molar mass and Avogadro's number. The stoichiometry step chemistry agents need.

## Output

Returns the converted quantity (grams, moles, and/or molecules) for the given chemical formula, along with the computed molar mass used in the calculation and Avogadro's number-based molecule count.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "grams": {
   "type": "string"
  },
  "moles": {
   "type": "string"
  },
  "formula": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "moles": 1,
  "molecules": 6.02214076e+23,
  "molar_mass_g_per_mol": 18.015
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-forgemesh-io-mole-conversion-api-c2de3040/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)
