# Sokal CML Prognostic Index Calculator

> Sokal CML Prognostic Index Calculator 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-15).

Computes the Sokal 1984 relative-risk index for newly diagnosed untreated chronic granulocytic leukemia (CML) and classifies patients as low, intermediate, or high risk.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/sokal
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/sokal-cml-prognostic-index-calculator-b13a9b36
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_HSmIKjmFr-M__N9BinEzn

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 sokal-cml-prognostic-index-calculator-b13a9b36
```

Example prompt: Calculate the Sokal CML risk index for a 52-year-old patient with a spleen palpable 12 cm below the costal margin, platelet count of 950 ×10⁹/L, and 4% circulating blasts — tell me the score and whether they're low, intermediate, or high risk.

## When to prefer this

Use this endpoint when you need to programmatically compute the Sokal 1984 relative-risk index for a newly diagnosed, untreated CML patient given structured clinical values (age, spleen size, platelets, blasts). Prefer it over manual formula evaluation or general LLM arithmetic for reliable, auditable scoring. Do not use for diagnosing CML, selecting TKI therapy, or scoring treated or previously diagnosed patients.

## Known failure modes

- Missing required parameters (age, spleen_cm, platelets_10e9_l, blasts_percent) returns a validation error
- Out-of-range values (e.g. platelets > 5000 or negative spleen) may return an error or unexpected result
- Endpoint does not diagnose CML or guide TKI therapy selection — misuse for those purposes yields clinically meaningless output
- Non-integer age input may fail schema validation
- Payment not fulfilled (x402) results in 402 Payment Required response

## How this service works

Sokal 1984 relative-risk index for newly diagnosed untreated chronic granulocytic leukemia (CML). sokal_index = exp(0.0116*(age-43.4)+0.0345*(spleen_cm-7.51)+0.188*((platelets_10e9_l/700)^2-0.563)+0.0887*(blasts_percent-2.10)). Low <0.8, intermediate 0.8–1.2, high >1.2. Coefficient 0.188. Does not diagnose CML or choose TKI therapy.

## Output

Returns the computed Sokal index value (a continuous number, e.g. 0.94) and the corresponding risk classification: low (<0.8), intermediate (0.8–1.2), or high (>1.2), based on the 1984 Sokal formula applied to the supplied age, spleen size, platelet count, and blast percentage.

## 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": [
      "age",
      "spleen_cm",
      "platelets_10e9_l",
      "blasts_percent"
     ],
     "properties": {
      "age": {
       "type": "integer",
       "description": "Age in years (integer 1-120). Sokal 1984 CML index; not the adult 18-120 clamp."
      },
      "spleen_cm": {
       "type": "number",
       "description": "Spleen size in cm below the costal margin (0-40). Sokal 1984."
      },
      "blasts_percent": {
       "type": "number",
       "description": "Circulating blasts as a percent of leukocytes (0-100). Sokal 1984."
      },
      "platelets_10e9_l": {
       "type": "number",
       "description": "Platelet count ×10⁹/L (1-5000). Sokal 1984; CML counts may exceed 2000."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "path": "/api/calc/sokal",
  "count": 2,
  "items": [
   {
    "age": 50,
    "formula": "sokal",
    "citation": {
     "id": "sokal-1984",
     "doi": "10.1182/blood.V63.4.789.789",
     "pmid": "6584184",
     "title": "Prognostic discrimination in \"good-risk\" chronic granulocytic leukemia",
     "source": "Blood. 1984;63(4):789-799",
     "authors": "Sokal JE, Cox EB, Baccarani M, Tura S, Gomez GA, Robertson JE, Tso CY, Braun TJ, Clarkson BD, Cervantes F, Rozman C"
    },
    "spleen_cm": 10,
    "disclaimer": "Not a medical device. Deterministic published-formula or published-code output for autonomous agents. A licensed clinician remains responsible for patient care and billing submissions.",
    "sokal_band": "intermediate",
    "sokal_index": 1.1,
    "blasts_percent": 2,
    "platelets_10e9_l": 350,
    "formula_expression": "sokal_index = exp(0.0116 * (age - 43.4) + 0.0345 * (spleen_cm - 7.51) + 0.188 * ((platelets_10e9_l / 700) ^ 2 - 0.563) + 0.0887 * (blasts_percent - 2.10))"
   },
   {
    "age": 50,
    "formula": "sokal",
    "citation": {
     "id": "sokal-1984",
     "doi": "10.1182/blood.V63.4.789.789",
     "pmid": "6584184",
     "title": "Prognostic discrimination in \"good-risk\" chronic granulocytic leukemia",
     "source": "Blood. 1984;63(4):789-799",
     "authors": "Sokal JE, Cox EB, Baccarani M, Tura S, Gomez GA, Robertson JE, Tso CY, Braun TJ, Clarkson BD, Cervantes F, Rozman C"
    },
    "spleen_cm": 10,
    "disclaimer": "Not a medical device. Deterministic published-formula or published-code output for autonomous agents. A licensed clinician remains responsible for patient care and billing submissions.",
    "sokal_band": "intermediate",
    "sokal_index": 1.1,
    "blasts_percent": 2,
    "platelets_10e9_l": 350,
    "formula_expression": "sokal_index = exp(0.0116 * (age - 43.4) + 0.0345 * (spleen_cm - 7.51) + 0.188 * ((platelets_10e9_l / 700) ^ 2 - 0.563) + 0.0887 * (blasts_percent - 2.10))"
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/sokal-cml-prognostic-index-calculator-b13a9b36/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)
