Calc Neonatal Eos
by magent in Other
Puopolo 2011 neonatal early-onset sepsis prior at birth (≥34 weeks) from maternal temperature, gestational age, ROM, GBS, and antibiotic timing, then Escobar 2014 posterior after a caller-assigned well, equivocal, or ill exam. Incidence intercepts 0.3-0.6 per 1000 replace the printed 47.8398 constant. Not a sepsis diagnosis or antibiotic order. magent does not examine the infant.
https://api.magentlab.com/api/calc/neonatal_eos- Price
- $0.005
- per call in USDC
- Uptime
- 100%
- last 30 days
- Response time
- 149 ms
- 351 ms slowest 5%
- Last check
- Passed
- 10 h ago, next any minute now
Reliability
Status and outage history · Atom feed · Watch with other listings
How to call it
GET https://api.magentlab.com/api/calc/neonatal_eos
Each call costs $0.005 in USDC on Base, paid with the request over x402.
Run a free test callOne unpaid request, the way an agent sends it. You see the payment challenge it gets back. Nothing is charged.
Example request
From the listing.
GET https://api.magentlab.com/api/calc/neonatal_eos?broad_spectrum_abx_4h=false&clinical_category=well&eos_incidence_per_1000=0.5&gbs=negative&gbs_or_any_abx_2h=false&gestational_age_weeks=40&maternal_temp_f=98.6&rom_hours=0Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
broad_spectrum_abx_4h | boolean | Yes | true if broad-spectrum antibiotics ≥4 h before delivery. Caller assigns. true or false. |
clinical_category | string | Yes | Caller-assigned Escobar 2014 exam category: well, equivocal, or ill. magent does not examine the infant. One of: well, equivocal, ill. |
eos_incidence_per_1000 | number | Yes | Local EOS incidence per 1000 live births. Only 0.3, 0.4, 0.5, or 0.6 (published intercepts). One of: 0.3, 0.4, 0.5, 0.6. |
gbs | string | Yes | Maternal GBS status: negative, positive, or unknown (Puopolo 2011). One of: negative, positive, unknown. |
gbs_or_any_abx_2h | boolean | Yes | true if GBS-specific antibiotics ≥2 h before delivery or any antibiotics 2-3.9 h before delivery. Caller assigns. true or false. |
gestational_age_weeks | number | Yes | Gestational age in weeks (34.0-43.0). Days as fractional weeks (39+4/7 ≈ 39.5714). Infants below 34 weeks are rejected (Puopolo 2011). |
maternal_temp_f | number | Yes | Highest maternal intrapartum temperature in °F (94.0-108.0), used to 0.1°F. |
rom_hours | number | Yes | Duration of rupture of membranes in hours (0-240). Transformed as (hours+0.05)^0.2. |
Example response
The provider's example. We can't check it without paying.
{
"broad_spectrum_abx_4h": false,
"citation": {
"authors": "Puopolo KM, Draper D, Wi S, Newman TB, Zupancic J, Lieberman E, Smith M, Escobar GJ",
"doi": "10.1542/peds.2010-3464",
"id": "puopolo-2011",
"pmid": "22025590",
"source": "Pediatrics. 2011;128(5):e1155-e1163",
"title": "Estimating the probability of neonatal early-onset infection on the basis of maternal risk factors"
},
"clinical_category": "well",
"clinical_lr": 0.41,
"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.",
"eos_incidence_per_1000": 0.5,
"formula": "neonatal_eos",
"formula_expression": "SRS = 1/(1+exp(−βx)); βx = intercept(eos_incidence_per_1000) + 0.8680×maternal_temp_f + (−6.9325)×GA + 0.0877×GA² + 1.2256×(ROM_h+0.05)^0.2 + (−1.0488)×gbs_or_any_abx_2h + (−1.1861)×broad_spectrum_abx_4h + GBS(positive 0.5771, unknown 0.0427, negative 0). Intercepts replace the printed 47.8398 case-control constant: 0.3→40.0528, 0.4→40.3415, 0.5→40.5656, 0.6→40.7489. Posterior odds = prior odds × Escobar 2014 conservative upper-95% CI LRs (well 0.41, equivocal 5.0, ill 21.2). Infants ≥34 weeks. Not a sepsis diagnosis or antibiotic order.",
"gbs": "negative",
"gbs_or_any_abx_2h": false,
"gestational_age_weeks": 40,
"maternal_temp_f": 98.6,
"posterior_risk_per_1000": 0.0159,
"prior_risk_per_1000": 0.0388,
"rom_hours": 0
}Call it from code
The curl command shows the payment challenge. The JavaScript and Python versions pay and call, and never pay more than $0.005.
curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i 'https://api.magentlab.com/api/calc/neonatal_eos?broad_spectrum_abx_4h=false&clinical_category=well&eos_incidence_per_1000=0.5&gbs=negative&gbs_or_any_abx_2h=false&gestational_age_weeks=40&maternal_temp_f=98.6&rom_hours=0'
# x402 v2 sends the challenge base64-encoded in the PAYMENT-REQUIRED header (v1 sends it in the body).
# To read the header:
curl -sS -g -o /dev/null -D - 'https://api.magentlab.com/api/calc/neonatal_eos?broad_spectrum_abx_4h=false&clinical_category=well&eos_incidence_per_1000=0.5&gbs=negative&gbs_or_any_abx_2h=false&gestational_age_weeks=40&maternal_temp_f=98.6&rom_hours=0' \
| grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decodeJavaScript: pay and call
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
// Pays at most $0.005 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.005" });
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const pay = wrapFetchWithPayment(fetch, client);
// Not sure it's safe to pay? ToolVet checks it first for $0.005. Pay for that from a separate
// client: this one is capped at $0.005 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fapi.magentlab.com%2Fapi%2Fcalc%2Fneonatal_eos
const res = await pay("https://api.magentlab.com/api/calc/neonatal_eos?broad_spectrum_abx_4h=false&clinical_category=well&eos_incidence_per_1000=0.5&gbs=negative&gbs_or_any_abx_2h=false&gestational_age_weeks=40&maternal_temp_f=98.6&rom_hours=0");
console.log(res.status, await res.text());Python: pay and call
# pip install "x402[requests,evm]"
import os
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client
# Pays at most $0.005 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.005"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))
with x402_requests(client) as session:
res = session.get("https://api.magentlab.com/api/calc/neonatal_eos?broad_spectrum_abx_4h=false&clinical_category=well&eos_incidence_per_1000=0.5&gbs=negative&gbs_or_any_abx_2h=false&gestational_age_weeks=40&maternal_temp_f=98.6&rom_hours=0")
print(res.status_code, res.text)Security scan
No findings
We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.
Recent checks
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 10 h ago | Passed | 402 | 143 ms | $0.005 |
| 20 h ago | Passed | 402 | 351 ms | $0.005 |
| 30 h ago | Passed | 402 | 274 ms | $0.005 |
| 40 h ago | Passed | 402 | 206 ms | $0.005 |
| 2 days ago | Passed | 402 | 224 ms | $0.005 |
Show 5 older checks
| 2 days ago | Passed | 402 | 149 ms | $0.005 |
| 3 days ago | Passed | 402 | 148 ms | $0.005 |
| 3 days ago | Passed | 402 | 148 ms | $0.005 |
| 4 days ago | Passed | 402 | 155 ms | $0.005 |
| 4 days ago | Passed | 402 | 136 ms | $0.005 |