# Moles/Grams/Molecules Converter (x402.forgemesh.io)

> Moles/Grams/Molecules Converter (x402.forgemesh.io) 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).

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

## Facts

- Endpoint: POST https://x402.forgemesh.io/moles-convert
- 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/moles-grams-molecules-converter-x402-forgemesh-io-b0771958
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_X0wjcralUjDTdooH1vCdF

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 moles-grams-molecules-converter-x402-forgemesh-io-b0771958 -d '<json body>'
```

Example prompt: How many moles and molecules are in 18 grams of H2O?

## When to prefer this

Use this endpoint when an agent needs to convert between grams, moles, and/or number of molecules for any chemical formula — particularly useful for stoichiometry calculations, lab preparation, or chemistry education contexts. Prefer over manual calculation to avoid errors with complex multi-element formulas.

## Known failure modes

- Invalid or unrecognized chemical formula returns an error
- Neither grams nor moles provided — at least one is required as input
- Malformed numeric string values for grams or moles
- Formula with unsupported elements may fail molar mass lookup

## How this service works

Mole conversion API: for any chemical formula, convert between grams, moles, and number of molecules using the formula's molar mass and Avogadro's number. Give grams or moles and get all three. For stoichiometry, lab prep, and chemistry education agents.

## Output

Returns all three interconverted quantities: grams, moles, and number of molecules for the given chemical formula — derived using the formula's molar mass and Avogadro's number.

## 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/moles-grams-molecules-converter-x402-forgemesh-io-b0771958/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)
