MA
Agent Service · x402 · early usage

Le Gall 1993 Simplified Acute Physiology Score II from 12 physiology variables (worst v…

Le Gall 1993 Simplified Acute Physiology Score II from 12 physiology variables (worst values in the first 24 hours as assigned by the caller), age, type of admission, and one chronic disease (AIDS, metastatic cancer, or hematologic malignancy). Max 163. Conve…

by api.magentlab.com · discovered, not yet claimed by its owner · updated 2026-10-12

30d calls3
30d payers1
MethodPOST
Outputjson

Mirrored from Coinbase's public x402 Bazaar. The description is the provider's own text and has not been reviewed here; the payment requirements are copied as published.

What it does

Le Gall 1993 Simplified Acute Physiology Score II from 12 physiology variables (worst values in the first 24 hours as assigned by the caller), age, type of admission, and one chronic disease (AIDS, metastatic cancer, or hematologic malignancy). Max 163. Converts the integer to hospital-mortality probability with the paper's logit. PaO2/FiO2 is scored only if ventilated or CPAP. Not SAPS 3. Not APACHE. magent does not measure vitals.

Tags: saps-ii · icu · severity · physiology · mortality · bazaar

Call contract

Method
POST
Input
HTTP request
Output
json
Last paid call
2026-10-12
Input example from Bazaar metadata
{
  "items": [
    {
      "admission_type": "scheduled_surgical",
      "age": 35,
      "bicarbonate_meq_l": 24,
      "bilirubin_mg_dl": 0.8,
      "bilirubin_umol_l": 14,
      "bun_mg_dl": 15,
      "chronic_disease": "none",
      "gcs": 15,
      "heart_rate": 80,
      "pao2_fio2": 250,
      "potassium_mmol_l": 4,
      "sodium_mmol_l": 140,
      "systolic_bp_mm_hg": 120,
      "temperature_c": 37,
      "urea_mmol_l": 5,
      "urine_output_l_day": 1.5,
      "ventilated": false,
      "wbc_k_ul": 8
    },
    {
      "admission_type": "scheduled_surgical",
      "age": 35,
      "bicarbonate_meq_l": 24,
      "bilirubin_mg_dl": 0.8,
      "bilirubin_umol_l": 14,
      "bun_mg_dl": 15,
      "chronic_disease": "none",
      "gcs": 15,
      "heart_rate": 80,
      "pao2_fio2": 250,
      "potassium_mmol_l": 4,
      "sodium_mmol_l": 140,
      "systolic_bp_mm_hg": 120,
      "temperature_c": 37,
      "urea_mmol_l": 5,
      "urine_output_l_day": 1.5,
      "ventilated": false,
      "wbc_k_ul": 8
    }
  ]
}
Output example
{
  "count": 2,
  "items": [
    {
      "citation": {
        "authors": "Le Gall JR, Lemeshow S, Saulnier F",
        "doi": "10.1001/jama.270.24.2957",
        "id": "le-gall-1993",
        "pmid": "8254858",
        "source": "JAMA. 1993;270(24):2957-2963",
        "title": "A new Simplified Acute Physiology Score (SAPS II) based on a European/North American multicenter study"
      },
      "components": [
        {
          "factor": "age",
          "points": 0,
          "present": false,
          "value": 35
        },
        {
          "factor": "heart_rate",
          "points": 0,
          "present": false,
          "value": 80
        },
        {
          "factor": "systolic_bp_mm_hg",
          "points": 0,
          "present": false,
          "value": 120
        },
        {
          "factor": "temperature_c",
          "points": 0,
          "present": false,
          "value": 37
        },
        {
          "branch": "not_ventilated",
          "factor": "oxygenation",
          "points": 0,
          "present": false,
          "value": null,
          "ventilated": false
        },
        {
          "factor": "urine_output_l_day",
          "points": 0,
          "present": false,
          "value": 1.5
        },
        {
          "branch": "urea_mmol_l",
          "factor": "urea",
          "points": 0,
          "present": false,
          "value": 5
        },
        {
          "factor": "wbc_k_ul",
          "points": 0,
          "present": false,
          "value": 8
        },
        {
          "factor": "potassium_mmol_l",
          "points": 0,
          "present": false,
          "value": 4
        },
        {
          "factor": "sodium_mmol_l",
          "points": 0,
          "present": false,
          "value": 140
        },
        {
          "factor": "bicarbonate_meq_l",
          "points": 0,
          "present": false,
          "value": 24
        },
        {
          "branch": "bilirubin_mg_dl",
          "factor": "bilirubin",
          "points": 0,
          "present": false,
          "value": 0.8
        },
        {
          "factor": "gcs",
          "points": 0,
          "present": false,
          "value": 15
        },
        {
          "factor": "admission_type",
          "points": 0,
          "present": false,
          "value": "scheduled_surgical"
        },
        {
          "factor": "chronic_disease",
          "points": 0,
          "present": false,
          "value": "none"
        }
      ],
      "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.",
      "formula": "saps_ii",
      "formula_expression": "SAPS II = sum of 17 Le Gall 1993 variables (worst values in 24h as assigned by the caller): heart_rate (<40 → 11, 40-69 → 2, 70-119 → 0, 120-159 → 4, ≥160 → 7), systolic_bp_mm_hg (<70 → 13, 70-99 → 5, 100-199 → 0, ≥200 → 2), temperature_c (<39 → 0, ≥39 → 3), PaO2/FiO2 mm Hg if ventilated or CPAP (<100 → 11, 100-199 → 9, ≥200 → 6) else 0, urine_output_l_day (<0.500 → 11, 0.500-0.999 → 4, ≥1.000 → 0), urea_mmol_l (<10.0 → 0, 10.0-29.9 → 6, ≥30.0 → 10) or bun_mg_dl (<28 → 0, 28-83 → 6, ≥84 → 10), wbc_k_ul (<1.0 → 12, 1.0-19.9 → 0, ≥20.0 → 3), potassium_mmol_l (<3.0 or ≥5.0 → 3, 3.0-4.9 → 0), sodium_mmol_l (<125 → 5, 125-144 → 0, ≥145 → 1), bicarbonate_meq_l (<15 → 6, 15-19 → 3, ≥20 → 0), bilirubin_mg_dl (<4.0 → 0, 4.0-5.9 → 4, ≥6.0 → 9) or bilirubin_umol_l (<68.4 → 0, 68.4-102.5 → 4, ≥102.6 → 9), gcs (<6 → 26, 6-8 → 13, 9-10 → 7, 11-13 → 5, 14-15 → 0), age (<40 → 0, 40-59 → 7, 60-69 → 12, 70-74 → 15, 75-79 → 16, ≥80 → 18), admission_type (scheduled_surgical → 0, medical → 6, unscheduled_surgical → 8), chronic_disease (none → 0, metastatic_cancer → 9, hematologic_malignancy → 10, aids → 17, one row not additive); logit = -7.7631 + 0.0737*SAPS_II + 0.9971*ln(SAPS_II+1); hospital_mortality_probability = exp(logit)/(1+exp(logit)); max 163",
      "hospital_mortality_probability": 0.000425,
      "logit": -7.7631,
      "max_score": 163,
      "score": 0
    },
    {
      "citation": {
        "authors": "Le Gall JR, Lemeshow S, Saulnier F",
        "doi": "10.1001/jama.270.24.2957",
        "id": "le-gall-1993",
        "pmid": "8254858",
        "source": "JAMA. 1993;270(24):2957-2963",
        "title": "A new Simplified Acute Physiology Score (SAPS II) based on a European/North American multicenter study"
      },
      "components": [
        {
          "factor": "age",
          "points": 0,
          "present": false,
          "value": 35
        },
        {
          "factor": "heart_rate",
          "points": 0,
          "present": false,
          "value": 80
        },
        {
          "factor": "systolic_bp_mm_hg",
          "points": 0,
          "present": false,
          "value": 120
        },
        {
          "factor": "temperature_c",
          "points": 0,
          "present": false,
          "value": 37
        },
        {
          "branch": "not_ventilated",
          "factor": "oxygenation",
          "points": 0,
          "present": false,
          "value": null,
          "ventilated": false
        },
        {
          "factor": "urine_output_l_day",
          "points": 0,
          "present": false,
          "value": 1.5
        },
        {
          "branch": "urea_mmol_l",
          "factor": "urea",
          "points": 0,
          "present": false,
          "value": 5
        },
        {
          "factor": "wbc_k_ul",
          "points": 0,
          "present": false,
          "value": 8
        },
        {
          "factor": "potassium_mmol_l",
          "points": 0,
          "present": false,
          "value": 4
        },
        {
          "factor": "sodium_mmol_l",
          "points": 0,
          "present": false,
          "value": 140
        },
        {
          "factor": "bicarbonate_meq_l",
          "points": 0,
          "present": false,
          "value": 24
        },
        {
          "branch": "bilirubin_mg_dl",
          "factor": "bilirubin",
          "points": 0,
          "present": false,
          "value": 0.8
        },
        {
          "factor": "gcs",
          "points": 0,
          "present": false,
          "value": 15
        },
        {
          "factor": "admission_type",
          "points": 0,
          "present": false,
          "value": "scheduled_surgical"
        },
        {
          "factor": "chronic_disease",
          "points": 0,
          "present": false,
          "value": "none"
        }
      ],
      "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.",
      "formula": "saps_ii",
      "formula_expression": "SAPS II = sum of 17 Le Gall 1993 variables (worst values in 24h as assigned by the caller): heart_rate (<40 → 11, 40-69 → 2, 70-119 → 0, 120-159 → 4, ≥160 → 7), systolic_bp_mm_hg (<70 → 13, 70-99 → 5, 100-199 → 0, ≥200 → 2), temperature_c (<39 → 0, ≥39 → 3), PaO2/FiO2 mm Hg if ventilated or CPAP (<100 → 11, 100-199 → 9, ≥200 → 6) else 0, urine_output_l_day (<0.500 → 11, 0.500-0.999 → 4, ≥1.000 → 0), urea_mmol_l (<10.0 → 0, 10.0-29.9 → 6, ≥30.0 → 10) or bun_mg_dl (<28 → 0, 28-83 → 6, ≥84 → 10), wbc_k_ul (<1.0 → 12, 1.0-19.9 → 0, ≥20.0 → 3), potassium_mmol_l (<3.0 or ≥5.0 → 3, 3.0-4.9 → 0), sodium_mmol_l (<125 → 5, 125-144 → 0, ≥145 → 1), bicarbonate_meq_l (<15 → 6, 15-19 → 3, ≥20 → 0), bilirubin_mg_dl (<4.0 → 0, 4.0-5.9 → 4, ≥6.0 → 9) or bilirubin_umol_l (<68.4 → 0, 68.4-102.5 → 4, ≥102.6 → 9), gcs (<6 → 26, 6-8 → 13, 9-10 → 7, 11-13 → 5, 14-15 → 0), age (<40 → 0, 40-59 → 7, 60-69 → 12, 70-74 → 15, 75-79 → 16, ≥80 → 18), admission_type (scheduled_surgical → 0, medical → 6, unscheduled_surgical → 8), chronic_disease (none → 0, metastatic_cancer → 9, hematologic_malignancy → 10, aids → 17, one row not additive); logit = -7.7631 + 0.0737*SAPS_II + 0.9971*ln(SAPS_II+1); hospital_mortality_probability = exp(logit)/(1+exp(logit)); max 163",
      "hospital_mortality_probability": 0.000425,
      "logit": -7.7631,
      "max_score": 163,
      "score": 0
    }
  ],
  "path": "/api/calc/saps_ii"
}

Use with an agent

  1. Discover. Agents find this listing with GET https://bazaar.saylorinnovations.com/discovery/search?query=…, the MCP tool search_resources, or /discovery/resources.
  2. Inspect. Fetch /resources/39536.json for the price and payment options.
  3. Pay. Call GET https://api.magentlab.com/api/calc/saps_ii. The provider answers 402 with its payment requirements. An x402 client signs one of the options below and retries with PAYMENT-SIGNATURE.
  4. Execute. The provider returns 200 with the data. Agent Bazaar is not in the request path and never sees your payment.

For humans

You don't need an account or an API key; you need a wallet holding a small amount of USDC on Base, and an x402-capable client (see the examples below). Call the endpoint unpaid first to see exactly what it asks for.

Pricing & payment

Price
$0.005 / request
Protocol
x402 v2
Auth
No account or API key. Pay per request.
Networks
Base
Demand
3 calls · 1 unique payers in 30d (public x402 Bazaar data)

x402 payment requirements

SchemeNetworkAssetAmountPay toTimeout
exactBase
eip155:8453
USDC$0.0050x836Be278f1739fB4308091cD1852F7971Bc19Ee2600s
accepts[] (raw JSON)
[
  {
    "scheme": "exact",
    "network": "eip155:8453",
    "payTo": "0x836Be278f1739fB4308091cD1852F7971Bc19Ee2",
    "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "amount": "5000",
    "amountUsd": 0.005,
    "maxTimeoutSeconds": 600
  }
]

Schemas

Output schema (JSON Schema)
{
  "properties": {
    "example": {
      "type": "object"
    },
    "type": {
      "type": "string"
    }
  },
  "required": [
    "type"
  ],
  "type": "object"
}
Example shape — generated from the schema, not a captured live response
{
  "example": {},
  "type": "string"
}

Examples

curl
curl "https://api.magentlab.com/api/calc/saps_ii"
# -> 402 Payment Required, accepts[] lists how to pay
# retry with a PAYMENT-SIGNATURE (or PAYMENT header) once paid
JavaScript
const res = await fetch("https://api.magentlab.com/api/calc/saps_ii");
if (res.status === 402) {
  const { accepts } = await res.json();
  // pay one of accepts[] via an x402 client, then retry with the payment header
}
Python
import httpx
res = httpx.get("https://api.magentlab.com/api/calc/saps_ii")
if res.status_code == 402:
    accepts = res.json()["accepts"]
    # pay one of accepts[] via an x402 client, then retry with the payment header

Details

Provider
api.magentlab.com
Endpoint
https://api.magentlab.com/api/calc/saps_ii
Machine-readable
/resources/39536.json