# magent ASDAS-ESR Calculator (Lukas 2009)

> magent ASDAS-ESR Calculator (Lukas 2009) 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 ASDAS-ESR disease activity score for axial spondyloarthritis using the Lukas 2009 formula with five caller-supplied patient-reported and lab values.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/asdas_esr
- 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-asdas-esr-calculator-lukas-2009-97687183
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_pZ3vMAhted4sDHbwmsMrx

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-asdas-esr-calculator-lukas-2009-97687183
```

Example prompt: Calculate the ASDAS-ESR score for my patient using the Lukas 2009 formula: back pain 7, morning stiffness duration 6, patient global assessment 8, peripheral pain/swelling 3, and ESR of 45 mm/h.

## When to prefer this

Use this endpoint when you need the ESR-based ASDAS variant (Lukas 2009) specifically, and ESR (not CRP) is the available lab value. Prefer over manual calculation to avoid arithmetic errors with the sqrt(ESR) term. Do not use if CRP is available and ASDAS-CRP is preferred, if you need the BASDAI total score, or if you need automated threshold classification per Machado 2011.

## Known failure modes

- Missing any of the five required query parameters returns a 400 error
- ESR values outside 0–150 mm/h are clamped by the service
- Non-numeric inputs for any parameter will cause a validation error
- Values outside the 0–10 range for patient-reported outcomes may not be validated — caller must enforce bounds
- Payment failure (x402) if USDC balance is insufficient

## How this service works

Lukas 2009 ASDAS-ESR: 0.08*back pain + 0.07*morning stiffness duration + 0.11*patient global + 0.09*peripheral pain/swelling + 0.29*sqrt(ESR). BASDAI 0-10 items and ESR in mm/h. magent does not examine the patient or assay ESR. Not ASDAS-CRP. Not BASDAI total. Does not apply Machado 2011 1.3/2.1/3.5 activity cuts. Not a diagnosis or biologic order.

## Output

Returns a numeric ASDAS-ESR composite score computed as: 0.08×back_pain + 0.07×morning_stiffness_duration + 0.11×patient_global + 0.09×peripheral_pain_swelling + 0.29×sqrt(ESR). The score reflects axial spondyloarthritis disease activity per Lukas 2009; interpretation against Machado 2011 activity thresholds (inactive <1.3, low 1.3–2.1, high 2.1–3.5, very high ≥3.5) must be applied by the caller.

## 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": [
      "back_pain",
      "morning_stiffness_duration",
      "patient_global",
      "peripheral_pain_swelling",
      "esr_mm_h"
     ],
     "properties": {
      "esr_mm_h": {
       "type": "number",
       "description": "Caller-assigned erythrocyte sedimentation rate in mm/h (Lukas 2009). Number 0-150 is a magent clamp. magent does not assay ESR."
      },
      "back_pain": {
       "type": "number",
       "description": "Caller-assigned total back pain on a 0-10 VAS or NRS (Lukas 2009; BASDAI question 2, neck/back/hip pain). Number 0-10. magent does not examine the patient."
      },
      "patient_global": {
       "type": "number",
       "description": "Caller-assigned patient global assessment of disease activity on a 0-10 VAS or NRS (Lukas 2009). Number 0-10. magent does not examine the patient."
      },
      "peripheral_pain_swelling": {
       "type": "number",
       "description": "Caller-assigned peripheral pain/swelling on a 0-10 VAS or NRS (Lukas 2009; BASDAI question 3, joints other than neck/back/hips). Number 0-10. magent does not examine the patient."
      },
      "morning_stiffness_duration": {
       "type": "number",
       "description": "Caller-assigned duration of morning stiffness on a 0-10 VAS or NRS (Lukas 2009; BASDAI question 6). Number 0-10, not hours. magent does not examine the patient."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/magent-asdas-esr-calculator-lukas-2009-97687183/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)
