# Grains to Milligrams Mass Converter

> Grains to Milligrams Mass Converter is a paid API for AI agents from agent402.tools, paid per call via x402, $0.001/call, status down (last checked 2026-09-16).

Converts a numeric mass value from grains to milligrams via a simple GET request.

## Facts

- Endpoint: GET https://agent402.tools/api/convert/grains-to-milligrams
- Price: $0.001/call
- Payment: x402
- Status: down
- Last checked: 2026-09-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/grains-to-milligrams-mass-converter-dc7544f1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_spFow6OY93hVr7SorMOES

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 grains-to-milligrams-mass-converter-dc7544f1
```

Example prompt: Can you convert 7.5 grains to milligrams for me?

## When to prefer this

Use this endpoint when you need a quick, programmatic conversion from grains (a unit used in pharmacy, ballistics, and gemology) to milligrams, especially within an automated agent workflow that already handles x402 micropayments. Prefer this over manual calculation or general-purpose math tools when you need a reliable, API-driven unit conversion in a pipeline.

## Known failure modes

- Missing 'value' query parameter returns an error or bad request
- Non-numeric value parameter causes a parse or validation error
- Negative or zero values may return an error depending on server validation
- Network timeout or server unavailability returns a 5xx error
- Payment failure via x402 protocol returns a 402 Payment Required response

## How this service works

Convert grains to milligrams (mass). Pass ?value=N.

## Output

Returns the converted mass value expressed in milligrams corresponding to the input grain value.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "value"
     ],
     "properties": {
      "value": {
       "type": "string",
       "description": "Numeric value to convert"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/grains-to-milligrams-mass-converter-dc7544f1/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
