MA
Agent Service · x402 · early usage

Berend 2014 physiological acid-base assessment

Berend 2014 physiological acid-base assessment. Labels acidemia or alkalemia, primary metabolic vs respiratory process, anion gap (Na-Cl-HCO3), optional albumin-corrected gap, and printed delta-delta. Not a diagnosis, ventilator order, bicarbonate dose, or bl…

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

30d calls5
30d payers2
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

Berend 2014 physiological acid-base assessment. Labels acidemia or alkalemia, primary metabolic vs respiratory process, anion gap (Na-Cl-HCO3), optional albumin-corrected gap, and printed delta-delta. Not a diagnosis, ventilator order, bicarbonate dose, or blood-gas assay.

Tags: abg · acid-base · berend · electrolytes · calculator · bazaar

Call contract

Method
POST
Input
HTTP request
Output
json
Last paid call
2026-10-12
Input example from Bazaar metadata
{
  "items": [
    {
      "albumin_g_dl": 4,
      "bicarbonate_mmol_l": 18,
      "chloride_mmol_l": 115,
      "lactate_mmol_l": 2,
      "paco2_mm_hg": 39,
      "ph": 7.28,
      "sodium_mmol_l": 135
    },
    {
      "albumin_g_dl": 4,
      "bicarbonate_mmol_l": 18,
      "chloride_mmol_l": 115,
      "lactate_mmol_l": 2,
      "paco2_mm_hg": 39,
      "ph": 7.28,
      "sodium_mmol_l": 135
    }
  ]
}
Output example
{
  "count": 2,
  "items": [
    {
      "anion_gap_class": "normal",
      "anion_gap_mmol_l": 2,
      "bicarbonate_mmol_l": 18,
      "chloride_mmol_l": 115,
      "citation": {
        "authors": "Berend K, de Vries APJ, Gans ROB",
        "doi": "10.1056/NEJMra1003327",
        "id": "berend-2014-acid-base",
        "pmid": "25295502",
        "source": "N Engl J Med. 2014;371:1434-1445",
        "title": "Physiological Approach to Assessment of Acid-Base Disturbances"
      },
      "criteria": [
        {
          "factor": "acidemia",
          "met": true,
          "value": 7.28
        },
        {
          "factor": "alkalemia",
          "met": false,
          "value": 7.28
        },
        {
          "factor": "metabolic_acidosis",
          "met": true,
          "value": 18
        },
        {
          "factor": "metabolic_alkalosis",
          "met": false,
          "value": 18
        },
        {
          "factor": "respiratory_acidosis",
          "met": false,
          "value": 39
        },
        {
          "factor": "respiratory_alkalosis",
          "met": false,
          "value": 39
        },
        {
          "factor": "high_anion_gap",
          "met": false,
          "value": 2
        },
        {
          "factor": "normal_anion_gap",
          "met": true,
          "value": 2
        }
      ],
      "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.",
      "disorders": [
        "acidemia",
        "metabolic acidosis",
        "normal anion-gap acidosis",
        "additional respiratory acidosis"
      ],
      "expected_paco2_high_mm_hg": 37,
      "expected_paco2_low_mm_hg": 33,
      "expected_paco2_mm_hg": 35,
      "formula": "abg",
      "formula_expression": "Berend 2014: acidemia if pH<7.38; alkalemia if pH>7.42; metabolic acidosis if pH<7.38 and HCO3<22; metabolic alkalosis if pH>7.42 and HCO3>26; respiratory acidosis if pH<7.38 and PaCO2>42; respiratory alkalosis if pH>7.42 and PaCO2<38; anion_gap=Na-Cl-HCO3 (high if >12); albumin-corrected AG=AG+2.5*(4.0-albumin) when albumin<4.0 g/dL; metabolic acidosis expected PaCO2=1.5*HCO3+8±2; metabolic alkalosis expected PaCO2=0.7*(HCO3-24)+40±2; acute respiratory acidosis HCO3 +1 per 10 mm Hg PaCO2 above 40; chronic +4 to +5; acute respiratory alkalosis HCO3 -2 per 10 mm Hg PaCO2 below 40; chronic -4 to -5; ketoacidosis delta-delta=ΔAG-ΔHCO3; lactic delta-delta=0.6*ΔAG-ΔHCO3 (simple if -5 to 5)",
      "paco2_mm_hg": 39,
      "ph": 7.28,
      "ph_status": "acidemia",
      "primary_process": "metabolic acidosis",
      "secondary_response": "additional respiratory acidosis",
      "sodium_mmol_l": 135
    },
    {
      "anion_gap_class": "normal",
      "anion_gap_mmol_l": 2,
      "bicarbonate_mmol_l": 18,
      "chloride_mmol_l": 115,
      "citation": {
        "authors": "Berend K, de Vries APJ, Gans ROB",
        "doi": "10.1056/NEJMra1003327",
        "id": "berend-2014-acid-base",
        "pmid": "25295502",
        "source": "N Engl J Med. 2014;371:1434-1445",
        "title": "Physiological Approach to Assessment of Acid-Base Disturbances"
      },
      "criteria": [
        {
          "factor": "acidemia",
          "met": true,
          "value": 7.28
        },
        {
          "factor": "alkalemia",
          "met": false,
          "value": 7.28
        },
        {
          "factor": "metabolic_acidosis",
          "met": true,
          "value": 18
        },
        {
          "factor": "metabolic_alkalosis",
          "met": false,
          "value": 18
        },
        {
          "factor": "respiratory_acidosis",
          "met": false,
          "value": 39
        },
        {
          "factor": "respiratory_alkalosis",
          "met": false,
          "value": 39
        },
        {
          "factor": "high_anion_gap",
          "met": false,
          "value": 2
        },
        {
          "factor": "normal_anion_gap",
          "met": true,
          "value": 2
        }
      ],
      "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.",
      "disorders": [
        "acidemia",
        "metabolic acidosis",
        "normal anion-gap acidosis",
        "additional respiratory acidosis"
      ],
      "expected_paco2_high_mm_hg": 37,
      "expected_paco2_low_mm_hg": 33,
      "expected_paco2_mm_hg": 35,
      "formula": "abg",
      "formula_expression": "Berend 2014: acidemia if pH<7.38; alkalemia if pH>7.42; metabolic acidosis if pH<7.38 and HCO3<22; metabolic alkalosis if pH>7.42 and HCO3>26; respiratory acidosis if pH<7.38 and PaCO2>42; respiratory alkalosis if pH>7.42 and PaCO2<38; anion_gap=Na-Cl-HCO3 (high if >12); albumin-corrected AG=AG+2.5*(4.0-albumin) when albumin<4.0 g/dL; metabolic acidosis expected PaCO2=1.5*HCO3+8±2; metabolic alkalosis expected PaCO2=0.7*(HCO3-24)+40±2; acute respiratory acidosis HCO3 +1 per 10 mm Hg PaCO2 above 40; chronic +4 to +5; acute respiratory alkalosis HCO3 -2 per 10 mm Hg PaCO2 below 40; chronic -4 to -5; ketoacidosis delta-delta=ΔAG-ΔHCO3; lactic delta-delta=0.6*ΔAG-ΔHCO3 (simple if -5 to 5)",
      "paco2_mm_hg": 39,
      "ph": 7.28,
      "ph_status": "acidemia",
      "primary_process": "metabolic acidosis",
      "secondary_response": "additional respiratory acidosis",
      "sodium_mmol_l": 135
    }
  ],
  "path": "/api/calc/abg"
}

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/39339.json for the price and payment options.
  3. Pay. Call GET https://api.magentlab.com/api/calc/abg. 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
5 calls · 2 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/abg"
# -> 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/abg");
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/abg")
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/abg
Machine-readable
/resources/39339.json