# magent EREFS Calculator (Hirano 2013 Modified)

> magent EREFS Calculator (Hirano 2013 Modified) is a paid API for AI agents from api.magentlab.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-14).

Computes the Hirano 2013 modified EREFS endoscopic score for eosinophilic esophagitis by summing five caller-assigned endoscopic findings (edema, rings, exudates, furrows, stricture) into a total score of 0–8.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/erefs
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/magent-erefs-calculator-hirano-2013-modified-f9c13521
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_yjOAbSPkSjJvw9RVSNJc4

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 magent-erefs-calculator-hirano-2013-modified-f9c13521
```

Example prompt: Calculate the modified EREFS score for a patient whose endoscopy showed edema present, moderate fixed rings, mild exudates (less than 10% surface area), furrows present, and no stricture.

## When to prefer this

Use this endpoint when you need to programmatically compute the Hirano 2013 modified EREFS score (max 8) from caller-supplied endoscopic findings for eosinophilic esophagitis. Prefer it over manual calculation to ensure consistent application of the modified scale (collapsed furrows 0–1, not the later 0–9 expansion). Do not use for diagnosis, endoscopy performance, or if you need the later extended 0–9 EREFS variant with separate inflammatory/fibrostenotic subscores.

## Known failure modes

- Missing required query parameter (edema, rings, exudates, furrows, or stricture) returns a 400 error
- Invalid enum value for any parameter (e.g., a rings value not in none/mild/moderate/severe) returns a 400 error
- Payment not provided or insufficient USDC via x402 protocol returns a 402 Payment Required
- Network timeout or server unavailability returns a 5xx error

## How this service works

Hirano 2013 modified EREFS: caller-assigned edema (absent 0, present 1), rings (none 0, mild 1, moderate 2, severe 3), exudates (none 0, mild_lt_10pct 1, severe_gt_10pct 2), furrows (absent 0, present 1; original 0-2 collapsed), stricture (absent 0, present 1). magent sums only (max 8; not later 0-9). No activity bands, inflammatory/fibrostenotic subscores, crepe-paper, or narrow-calibre. magent does not perform endoscopy. Not a diagnosis.

## Output

Returns the Hirano 2013 modified EREFS total score (integer 0–8) derived by summing the five caller-assigned component grades: edema (0–1), rings (0–3), exudates (0–2), furrows (0–1), and stricture (0–1). No activity bands, inflammatory/fibrostenotic subscores, or extended 0–9 features are included.

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "headers": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    },
    "queryParams": {
     "type": "object",
     "required": [
      "edema",
      "rings",
      "exudates",
      "furrows",
      "stricture"
     ],
     "properties": {
      "edema": {
       "enum": [
        "absent",
        "present"
       ],
       "type": "string",
       "description": "Caller-assigned Hirano 2013 modified EREFS edema (oedema; loss of vascular markings): absent (0; vascular markings present) or present (1; decreased or absent vascular markings). magent does not perform endoscopy."
      },
      "rings": {
       "enum": [
        "none",
        "mild",
        "moderate",
        "severe"
       ],
       "type": "string",
       "description": "Caller-assigned Hirano 2013 EREFS rings (fixed rings): none (0), mild (1; subtle circumferential ridges), moderate (2; distinct rings that a diagnostic adult endoscope still passes), or severe (3; cannot pass a diagnostic adult endoscope). magent does not perform endoscopy."
      },
      "furrows": {
       "enum": [
        "absent",
        "present"
       ],
       "type": "string",
       "description": "Caller-assigned Hirano 2013 modified EREFS furrows (vertical lines): absent (0) or present (1). Original Hirano 2013 graded furrows 0-2 (none / mild without depth / severe with indentation); the modified good-agreement version collapses that to absent vs present. Not the later 0-9 expansion that restores furrows 0-2. magent does not perform endoscopy."
      },
      "exudates": {
       "enum": [
        "none",
        "mild_lt_10pct",
        "severe_gt_10pct"
       ],
       "type": "string",
       "description": "Caller-assigned Hirano 2013 EREFS exudates (white plaques): none (0), mild_lt_10pct (1; lesions involving <10% of the oesophageal surface area), or severe_gt_10pct (2; lesions involving >10% of the oesophageal surface area). magent does not perform endoscopy."
      },
      "stricture": {
       "enum": [
        "absent",
        "present"
       ],
      
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/magent-erefs-calculator-hirano-2013-modified-f9c13521/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.magentlab.com](https://www.zero.xyz/host/api.magentlab.com/llms.txt)
